package com.casic.missiles.model.system;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.alibaba.excel.enums.poi.BorderStyleEnum;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 系统管理-常用工具-签章/签名管理表
 * </p>
 *
 * @author wangpeng
 * @since 2022-12-01
 */
@ColumnWidth(30)
@HeadRowHeight(15)
@ContentRowHeight(20)
@ContentStyle(borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN, borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
@ExcelIgnoreUnannotated
@ApiModel
@Data
@TableName("system_sign")
public class SystemSign implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键id", dataType = "Long", required = true)
    @NotNull(message = "主键id不能为空")
    @TableId("id")
    private Long id;

    /**
     * 签章/签名编号
     */
    @ExcelProperty("编号")
    @ApiModelProperty(value = "签章/签名编号", dataType = "String")
    @NotBlank(message = "编号不能为空")
    @TableField("sign_no")
    private String signNo;

    /**
     * 签章/签名名称
     */
    @ExcelProperty("名称")
    @ApiModelProperty(value = "签章/签名编号", dataType = "String")
    @NotBlank(message = "名称不能为空")
    @TableField("sign_name")
    private String signName;

    /**
     * 签章/签名描述
     */
    @ExcelProperty("描述")
    @ApiModelProperty(value = "签章/签名描述", dataType = "String")
    @TableField("sign_desc")
    private String signDesc;

    /**
     * 签章/签名负责人
     */
    @ExcelProperty("负责人")
    @ApiModelProperty(value = "签章/签名负责人", dataType = "String")
    @NotBlank(message = "负责人不能为空")
    @TableField("sign_director")
    private String signDirector;

    /**
     * 签名用户id（一个用户一个签名，签名不使用关联表，签章暂时使用和使用人的关联表）
     */
    @TableField("sign_user_id")
    private Long signUserId;

    /**
     * 签章或签名-字典code
     */
    @ApiModelProperty(value = "签章/签名-字典code", dataType = "String")
    @NotBlank(message = "类型不能为空")
    @TableField("sign_type")
    private String signType;

    /**
     * minio存储文件名
     */
    @ApiModelProperty(value = "上传文件返回文件名", dataType = "String")
    @NotBlank(message = "文件不能为空")
    @TableField("minio_file_name")
    private String minioFileName;

    /**
     * 删除标记
     */
    @ApiModelProperty(hidden = true)
    @TableField("is_del")
    private Integer isDel;

    /**
     * 创建时间
     */
    @ExcelProperty("创建时间")
    @ApiModelProperty(value = "创建时间（列表接口参数）", dataType = "String")
    @TableField("create_time")
    private String createTime;

    /**
     * 更新时间
     */
    @ApiModelProperty(hidden = true)
    @TableField("update_time")
    private String updateTime;

    @ApiModelProperty(hidden = true)
    @NotEmpty(message = "可使用人不能为空")
    @TableField(exist = false)
    private List<Long> userIdList;

    @ApiModelProperty(hidden = true)
    private String deptName;

}
