xiaoyong931011
2021-07-21 f79dd632f83167b3cd5ad01e2f7c494b92c834d3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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 + "]";
    }
    
}