package com.casic.missiles.model.meter;

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.alibaba.fastjson.annotation.JSONField;
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 java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 计量管理-计量文件-文件表
 * </p>
 *
 * @author wangpeng
 * @since 2022-11-22
 */
@ColumnWidth(30)
@HeadRowHeight(15)
@ContentRowHeight(20)
@ContentStyle(borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN, borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
@ExcelIgnoreUnannotated
@ApiModel
@Data
@TableName("meter_file")
public class MeterFile implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId("id")
    @ApiModelProperty(value = "主键id（列表接口返回参数）", dataType = "Long")
    private Long id;

    /**
     * 文件编号-系统生成
     */
    @ExcelProperty("文件编号")
    @TableField("file_no")
    @ApiModelProperty(value = "文件编号", dataType = "String")
    private String fileNo;

    /**
     * 文件名称
     */
    @ExcelProperty("文件名称")
    @ApiModelProperty(value = "文件名称", dataType = "String")
    @TableField("file_name")
    private String fileName;

    /**
     * 文件号
     */
    @ExcelProperty("文件号")
    @ApiModelProperty(value = "文件号", dataType = "String", required = true)
    @NotBlank(message = "文件号不能为空")
    @TableField("file_code")
    private String fileCode;

    /**
     * 文件类别-字典code
     */
    @ApiModelProperty(value = "文件类别字典code", dataType = "String", required = true)
    @NotBlank(message = "文件类别不能为空")
    @TableField("file_type")
    private String fileType;

    @ExcelProperty("文件类别")
    @ApiModelProperty(value = "文件类别字典value（列表接口返回参数）", dataType = "String")
    @TableField(exist = false)
    private String fileTypeName;

    /**
     * 发布时间
     */
    @ExcelProperty("发布时间")
    @ApiModelProperty(value = "发布时间", dataType = "String")
    @TableField("publish_time")
    private String publishTime;

    /**
     * 发布单位-存名字
     */
    @ExcelProperty("发布单位")
    @ApiModelProperty(value = "发布单位", dataType = "String")
    @TableField("publisher")
    private String publisher;

    /**
     * 实施时间
     */
    @ExcelProperty("实施时间")
    @ApiModelProperty(value = "实施时间", dataType = "String")
    @TableField("effective_time")
    private String effectiveTime;

    /**
     * 实施状态-字典code
     */
    @ApiModelProperty(value = "实施状态", dataType = "String")
    @TableField("effective_status")
    private String effectiveStatus;

    @ExcelProperty("实施状态")
    @ApiModelProperty(value = "实施状态字典value（列表接口返回参数）", dataType = "String")
    @TableField(exist = false)
    private String effectiveStatusName;

    /**
     * 创建人
     */
    @ExcelProperty("创建人")
    @ApiModelProperty(value = "创建人", dataType = "String")
    @TableField("create_user")
    private String createUser;

    /**
     * 登录者用户id（保证流程发起人为登录用户），接口中获取，工作流中使用
     * 可与创建人不同，表示代他人申请，其他人可为非系统中用户
     */
    @ApiModelProperty(hidden = true)
    @TableField("create_user_id")
    private Long createUserId;

    /**
     * minio存储文件名
     */
    @ExcelProperty("存储文件名")
    @ApiModelProperty(value = "上传文件返回名称", dataType = "String")
    @TableField("minio_file_name")
    private String minioFileName;

    /**
     * 备注
     */
    @ExcelProperty("备注")
    @ApiModelProperty(value = "备注", dataType = "String")
    @TableField("remark")
    private String remark;

    /**
     * 流程实例id
     */
    @ApiModelProperty(value = "流程实例id（未通过文件编辑接口必传参数）", dataType = "String")
    @TableField("process_id")
    private String processId;

    /**
     * 审批状态-字典code
     */
    @ApiModelProperty(hidden = true)
    @TableField("approval_status")
    private String approvalStatus;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String approvalStatusName;

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

    /**
     * 创建时间
     */
    @ApiModelProperty(hidden = true)
    @TableField("create_time")
    private String createTime;

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

    @ApiModelProperty(hidden = true)
    @JSONField(serialize = false)
    @TableField(exist = false)
    private List<Long> ids;
}
