package com.casic.missiles.model.business;

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.NotNull;
import java.io.Serializable;

/**
 * <p>
 * 分包检定证书表
 * </p>
 *
 * @author wangpeng
 * @since 2023-03-23
 */
@ApiModel
@Data
@TableName("business_outsource_certificate")
public class BusinessOutsourceCertificate implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId("id")
    @ApiModelProperty(value = "主键id（编辑必传）", dataType = "String")
    private Long id;

    /**
     * 证书编号
     */
    @ApiModelProperty(value = "证书编号", dataType = "String", required = true)
    @TableField("certificate_code")
    private String certificateCode;

    /**
     * 证书名称
     */
    @ApiModelProperty(value = "证书名称", dataType = "String", required = true)
    @TableField("certificate_name")
    private String certificateName;

    /**
     * 分包方id
     */
    @NotNull(message = "分包方id不能为空")
    @ApiModelProperty(value = "分包方id", dataType = "String", required = true)
    @TableField("outsourcer_id")
    private Long outsourcerId;

    /**
     * 委托书id
     */
    @NotNull(message = "委托书id不能为空")
    @ApiModelProperty(value = "委托书id", dataType = "String", required = true)
    @TableField("order_id")
    private Long orderId;

    /**
     * 样品id
     */
    @NotNull(message = "样品id不能为空")
    @ApiModelProperty(value = "样品id", dataType = "String", required = true)
    @TableField("sample_id")
    private Long sampleId;

    /**
     * 原始记录文件（minio存储文件名）
     */
    @ApiModelProperty(value = "原始记录文件（minio存储文件名）", dataType = "String")
    @TableField("original_record_file")
    private String originalRecordFile;

    /**
     * 证书文件（minio存储文件名）
     */
    @NotBlank(message = "证书文件不能为空")
    @ApiModelProperty(value = "证书文件（minio存储文件名）", dataType = "String", required = true)
    @TableField("certificate_file")
    private String certificateFile;

    /**
     * 出具日期
     */
    @TableField("issuance_date")
    @ApiModelProperty(value = "出具日期", dataType = "String")
    private String issuanceDate;

    /**
     * 证书有效期
     */
    @TableField("expiration_date")
    @ApiModelProperty(value = "证书有效期", dataType = "String")
    private String expirationDate;

    /**
     * 打印状态（1已打印 0未打印）
     */
    @ApiModelProperty(hidden = true)
    @TableField("print_status")
    private Integer printStatus;

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

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


}
