package com.gxwebsoft.common.system.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 字典数据
 *
 * @author WebSoft
 * @since 2020-03-14 11:29:04
 */
@Data
@ApiModel(description = "字典数据(业务类)")
@TableName("sys_dict_data")
public class DictData implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "字典数据id")
    @TableId(type = IdType.AUTO)
    private Integer dictDataId;

    @ApiModelProperty(value = "字典id")
    private Integer dictId;

    @ApiModelProperty(value = "字典数据标识")
    private String dictDataCode;

    @ApiModelProperty(value = "字典数据名称")
    private String dictDataName;

    @ApiModelProperty(value = "字段名称")
    @TableField(exist = false)
    private String text;

    @ApiModelProperty(value = "字段名称")
    @TableField(exist = false)
    private String label;

    @ApiModelProperty(value = "字段值")
    @TableField(exist = false)
    private String value;

    @ApiModelProperty(value = "预设字段:路由地址")
    private String path;

    @ApiModelProperty(value = "预设字段:组件路径")
    private String component;

    @ApiModelProperty(value = "排序号")
    private Integer sortNumber;

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

    @ApiModelProperty(value = "是否删除, 0否, 1是")
    @TableLogic
    private Integer deleted;

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

    @ApiModelProperty(value = "修改时间")
    private Date updateTime;

    @ApiModelProperty(value = "字典代码")
    @TableField(exist = false)
    private String dictCode;

    @ApiModelProperty(value = "字典名称")
    @TableField(exist = false)
    private String dictName;

    @ApiModelProperty(value = "租户id")
    private Integer tenantId;

    public String getText() {
      return this.dictDataName;
    }
    public String getLabel() {
      return this.dictDataName;
    }
    public String getValue() {
      return this.dictDataCode;
    }
}
