package com.gxwebsoft.common.system.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Set;

/**
 * 字典
 *
 * @author WebSoft
 * @since 2020-03-14 11:29:03
 */
@Data
@Schema(description = "字典(业务类)")
@TableName("gxwebsoft_core.sys_dict")
public class Dict implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "字典id")
    @TableId(type = IdType.AUTO)
    private Integer dictId;

    @Schema(description = "字典标识")
    private String dictCode;

    @Schema(description = "字典名称")
    private String dictName;

    @Schema(description = "排序号")
    private Integer sortNumber;

    @Schema(description = "备注")
    private String comments;

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

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @Schema(description = "租户id")
    private Integer tenantId;

    @Schema(description = "字典项列表")
    @TableField(exist = false)
    private Set<Set<String>> items;

}
