package com.softwarebr.nunu.entity.go;

import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.*;
import java.time.LocalDateTime;

/**
 * 标签
 * @date 2020-02-19 14:03:47
 * @author lilin
 */

@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name="go_label")
@Builder
public class Label {


	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@ApiModelProperty(value = "id", required = true, example = "1")
	private Long id;

	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	@ApiModelProperty(value = "创建时间", required = true, example = "2018-03-12 21:32:33")
	private LocalDateTime createDate;

	@ApiModelProperty(value = "父级标签id(一级标签设置为0)", required = true, example = "")
	private Long parentId;

	@ApiModelProperty(value = "标签名称", required = true, example = "")
	private String labelName;

	@ApiModelProperty(value = "排序(一级标签ui上不需要,设置为0)", required = true, example = "")
	private Integer sort;

	@ApiModelProperty(value = "状态0.已删除 1.未删除", required = true, example = "")
	private Integer status;

}