package com.sunyard.ssp.modules.sysconf.dict.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author fyc
 * @since 2020-03-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("SC_DICT")
public class ScDict implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId("ID")
    private Long id;

    @TableField("CREATE_TIME")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * 备注
     */
    @TableField("DESCRIPTION")
    private String description;

    /**
     * 字典名称
     */
    @TableField("TITLE")
    private String title;

    /**
     * 字典类型
     */
    @TableField("TYPE")
    private String type;

    /**
     * 作用范围(仅对平台创建字典有效) 1 全部 2 隐藏
     */
    @TableField("SCOPE")
    private Integer scope;

    /**
     * 排序值
     */
    @TableField("SORT_ORDER")
    private Double sortOrder;

    /**
     * 字典数据，非表映射关系
     */
    @TableField(exist = false)
    private List<ScDictData> scDictDataList;


}
