package com.lesingle.modules.sys.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lesingle.common.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * 数据字典实体
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_sys_dict")
@Schema(description = "数据字典实体")
public class SysDict extends BaseEntity {

    @Schema(description = "租户ID")
    @TableField("tenant_id")
    private Long tenantId;

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

    @Schema(description = "字典编码（租户内唯一）")
    private String code;

    @Schema(description = "描述")
    private String description;

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