package com.jy.system.model.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.jy.framework.model.base.BaseIdPo;
import com.jy.framework.model.validation.AddGroup;
import com.jy.framework.model.validation.EditGroup;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/**
 * <p>
 * 全局配置
 * </p>
 *
 * @author
 * @since 2024-06-20
 */
@Getter
@Setter
@TableName("sys_config")
public class SysConfig extends BaseIdPo {

    /**
     * 配置编码
     */
    @NotBlank(groups = {AddGroup.class, EditGroup.class})
    private String code;

    /**
     * 配置值
     */
    @NotBlank(groups = {AddGroup.class, EditGroup.class})
    private String value;

    /**
     * 配置名称
     */
    @NotBlank(groups = {AddGroup.class, EditGroup.class})
    private String name;

    /**
     * 是否系统内置 1是 0否
     */
    @NotNull(groups = {AddGroup.class, EditGroup.class})
    private Integer builtin;

    /**
     * 备注
     */
    private String remark;

    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    private Long createUser;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新人
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateUser;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     * 逻辑删除标记
     */
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private String delFlag;

}
