package com.jy.system.model.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.jy.framework.model.base.BaseIdPo;
import com.jy.framework.model.validation.AddGroup;
import com.jy.framework.model.validation.EditGroup;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/**
 * <p>
 * 字典数据
 * </p>
 *
 * @author
 * @since 2024-06-20
 */
@Getter
@Setter
@TableName("sys_dict_data")
public class SysDictData extends BaseIdPo {

    /**
     * 字典类型id
     */
    @NotNull(groups = {AddGroup.class, EditGroup.class})
    private Long dictTypeId;

    /**
     * 字典标签
     */
    @NotBlank(groups = {AddGroup.class, EditGroup.class})
    private String label;

    /**
     * 字典值
     */
    @NotNull(groups = {AddGroup.class, EditGroup.class})
    private Integer value;

    /**
     * 表格回显样式
     */
    @NotBlank(groups = {AddGroup.class, EditGroup.class})
    private String cssStyle;

    /**
     * 状态 1启用 0禁用
     */
    @NotNull(groups = {AddGroup.class, EditGroup.class})
    private Integer status;

    /**
     * 排序
     */
    @NotNull(groups = {AddGroup.class, EditGroup.class})
    private Integer sort;

    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    private Long createUser;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新人
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateUser;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     * 逻辑删除标记
     */
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private String delFlag;

}
