package com.codvision.base.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * @author hxl
 */
@Data
@ApiModel(value = "SysDict", description = "字典信息")
@TableName(value = "tbl_sys_dict")
public class SysDict implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @NotBlank(message = "请填写字典类型")
    @ApiModelProperty("字典类型")
    private String dictType;

    @NotBlank(message = "请添加字典描述")
    @ApiModelProperty("字典描述")
    private String description;

    @NotNull(message = "请选择是否系统内置")
    @ApiModelProperty("是否系统内置（0:否, 1:是）")
    private Integer systemFlag;

    @ApiModelProperty("删除标记,1:已删除,0:正常")
    private Integer delFlag;

    @ApiModelProperty("逻辑删除辅助字段")
    private Integer delKey;

    @ApiModelProperty("关键字，查询用")
    @TableField(exist = false)
    private String keyword;
}
