package com.xzx.gc.entity;
|
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonView;
|
import com.xzx.gc.util.ValidateConfig;
|
import lombok.Data;
|
import org.springframework.data.annotation.Id;
|
|
import javax.persistence.Table;
|
import javax.validation.constraints.NotBlank;
|
import java.util.Date;
|
|
/**
|
* 描述: 字典
|
* @author : xiandafu
|
*/
|
@Table(name="core_dict")
|
@Data
|
public class CoreDict {
|
|
@Id
|
private Long id;
|
private String value; // 数据值
|
//删除标识
|
@JsonIgnore
|
private Integer delFlag = 0;
|
//创建时间
|
private Date createTime;
|
@NotBlank(message = "字典类型不能为空", groups = ValidateConfig.ADD.class)
|
@JsonView(TypeListView.class)
|
private String type; //类型
|
@JsonView(TypeListView.class)
|
@NotBlank(message = "字典类型描述不能为空")
|
private String typeName; //类型描述
|
@NotBlank(message = "字典值不能为空", groups = ValidateConfig.ADD.class)
|
|
@NotBlank(message = "字典值名称不能为空")
|
private String name; // 标签名
|
private Integer sort; // 排序
|
private Long parent; //父Id
|
private String remark; //备注
|
public interface TypeListView{
|
}
|
|
|
@Override
|
public String toString() {
|
return "CoreDict [value=" + value + ", type=" + type + ", name=" + name + "]";
|
}
|
|
}
|