package cn.pluss.platform.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;
import java.util.List;

/**
 * 通用开关表
 * CREATE TABLE `tb_pluss_common_switch` (
 *   `id` int(11) NOT NULL AUTO_INCREMENT,
 *   `code` varchar(50) DEFAULT NULL COMMENT '对应字典表的code',
 *   `name` varchar(50) DEFAULT NULL COMMENT '名称',
 *   `value` varchar(50) DEFAULT NULL COMMENT '对应字典表子项的值',
 *   `sort` int(11) DEFAULT NULL COMMENT '排序',
 *   `createTime` datetime DEFAULT NULL COMMENT '创建时间',
 *   `updateTime` datetime DEFAULT NULL COMMENT '更新时间',
 *   PRIMARY KEY (`id`),
 *   UNIQUE KEY `idx_code` (`code`)
 * ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='开关表';
 */
@Data
@Accessors(chain = true)
public class CommonSwitch {

    private Integer id;

    private String name;

    private String code;

    private String value;

    private Integer sort;

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

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     * 可选项
     */
    @TableField(exist = false)
    private List<Dict> alterList;
}
