package com.zfire.jiasm.syncdata.plus.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 字典
 * </p>
 *
 * @author gejiang
 * @since 2023-07-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="SysDict对象", description="字典")
public class SysDict extends Model<SysDict> {

    private static final long serialVersionUID=1L;

    @TableId(value = "sys_dict_id", type = IdType.ID_WORKER_STR)
    private String sysDictId;

    @ApiModelProperty(value = "字典类型(请参考sys_dict_type表维护该字段)")
    private String dictType;

    @ApiModelProperty(value = "字典编号")
    private String dictCode;

    @ApiModelProperty(value = "字典值")
    private String dictValue;

    @ApiModelProperty(value = "字典状态(有效无效) ON/OFF")
    private String status;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "小前大后")
    private Integer sortNum;

    @ApiModelProperty(value = "父字典code(请结合字典类型一起使用)")
    private String parentDictCode;

    @ApiModelProperty(value = "父字典类型")
    private String parentDictType;

    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "是否删除 0=正常 1=删除")
    @TableLogic
    private Boolean del;

    @ApiModelProperty(value = "参考HOME=家用 COMMERCIAL=商用（大类用）")
    private String flag;

    @ApiModelProperty(value = "是否对接外部系统(集团用) YES/NO")
    private String isExternalSys;


    @Override
    protected Serializable pkVal() {
        return this.sysDictId;
    }

}
