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 lombok.EqualsAndHashCode;

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

/**
 * 系统设置
 *
 * @author WebSoft
 * @since 2022-11-19 13:54:27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "Setting对象", description = "系统设置")
@TableName("sys_setting")
public class Setting implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "id")
    @TableId(value = "setting_id", type = IdType.AUTO)
    private Integer settingId;

    @Schema(description = "设置项标示")
    private String settingKey;

    @Schema(description = "设置内容（json格式）")
    private String content;

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

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

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

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

    @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 = "修改租户名称")
    @TableField(exist = false)
    private String tenantName;

}
