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 com.casic.missiles.annotation.DictCodeField;
import com.casic.missiles.constants.MeterDictCode;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 业务管理-证书报告
 * </p>
 *
 * @author zt
 * @since 2023-02-02
 */
@Data
@TableName("business_certificate_report")
public class BusinessCertificateReport implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId("id")
    private Long id;

    /**
     * 证书报告编号
     */
    @TableField("certificate_report_code")
    @ApiModelProperty(value = "证书报告编号", dataType = "String")
    private String certificateReportCode;

    /**
     * 证书报告名称
     */
    @TableField("certificate_report_name")
    @ApiModelProperty(value = "证书报告名称", dataType = "String")
    private String certificateReportName;


    /**
     * 证书报告名称
     */
    @TableField("certificate_report_type")
    @ApiModelProperty(value = "证书报告类型", dataType = "String")
    @DictCodeField(message = "证书报告类型不合法", cacheName = MeterDictCode.CERTIFICATE_CLASS)
    private String certificateReportType;

    /**
     * 证书类别，多个逗号分割（字典code）
     */
    @TableField("certificate_report_category")
    @ApiModelProperty(value = "证书类别，多个逗号分割（字典code）", dataType = "String")
    private String certificateReportCategory;

    /**
     * 委托书id
     */
    @TableField("order_id")
    @ApiModelProperty(value = "委托书id", dataType = "Long")
    private Long orderId;

    /**
     * 样品id
     */
    @TableField("sample_id")
    @ApiModelProperty(value = "样品id", dataType = "Long")
    private Long sampleId;

    /**
     * 检定部门id（可用于获取实验室已完成证书个数）
     */
    @TableField("measure_dept_id")
    @ApiModelProperty(value = "检定部门id", dataType = "Long")
    private Long measureDeptId;

    /**
     * 检校专业（字典code）
     */
    @TableField("calibration_major")
    @ApiModelProperty(value = "检校专业", dataType = "String")
    @DictCodeField(message = "检校专业不合法", cacheName = MeterDictCode.CALIBRATION_MAJOR)
    private String calibrationMajor;
    /**
     * 出具日期
     */
    @TableField("issuance_date")
    @ApiModelProperty(value = "出具日期", dataType = "String")
    private String issuanceDate;

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

    /**
     * 检定结果（字典code）
     */
    @TableField("measure_result")
    @ApiModelProperty(value = "检定结果", dataType = "String")
    private String measureResult;

    /**
     * 证书报告模板id
     */
    @TableField("template_id")
    @ApiModelProperty(value = "证书报告模板id", dataType = "Long")
    private Long templateId;

    /**
     * 电子签章id（签章表id）
     */
    @TableField("sign_id")
    @ApiModelProperty(value = "电子签章id", dataType = "Long")
    private Long signId;

    /**
     * 认可标志专用章id（签章表id）
     */
    @TableField("approval_sign_ids")
    @ApiModelProperty(value = "认可标志专用章ids", dataType = "Long")
    private String approvalSignIds;

    /**
     * 证书报告附件（minio存储文件名）
     */
    @TableField("certificate_report_file")
    @ApiModelProperty(value = "证书报告附件", dataType = "String")
    private String certificateReportFile;

    /**
     * 原始记录id
     */
    @TableField("original_record_id")
    @ApiModelProperty(value = "原始记录id", dataType = "Long")
    private Long originalRecordId;

    /**
     * 可打印状态（字典code）
     */
    @TableField("print_status")
    @ApiModelProperty(value = "可打印状态", dataType = "String")
    private String printStatus;

    /**
     * 打印次数
     */
    @TableField("print_num")
    @ApiModelProperty(value = "打印次数", dataType = "Integer")
    private Integer printNum;

    /**
     * 检定人员
     */
    @TableField("measure_person_id")
    @ApiModelProperty(value = "检定人员", dataType = "String")
    private Long measurePersonId;

    /**
     * 审批状态（字典code）
     */
    @TableField("approval_status")
    @ApiModelProperty(value = "审批状态", dataType = "String")
    @DictCodeField(message = "审批状态不合法", cacheName = MeterDictCode.APPROVAL_STATUS)
    private String approvalStatus;

    @TableField("remark")
    @ApiModelProperty(value = "备注", dataType = "String")
    private String remark;
    /**
     * 出具日期
     */
    @TableField("submit_date")
    @ApiModelProperty(value = "提交时间", dataType = "String")
    private String submitDate;

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

    @TableField("is_del")
    private Boolean isDel;

    @TableField("create_user")
    private Long createUser;

    @TableField("create_time")
    private String createTime;

    @TableField("update_time")
    private String updateTime;

    @TableField(exist = false)
    @ApiModelProperty(value = "原始记录信息", dataType = "Object")
    private BusinessOriginalRecord businessOriginalRecord;

    @TableField(exist = false)
    @ApiModelProperty(value = "检校专业名称", dataType = "String")
    private String calibrationMajorName;

    @TableField(exist = false)
    @ApiModelProperty(value = "审批状态名称", dataType = "String")
    private String approvalStatusName;

    @TableField(exist = false)
    @ApiModelProperty(value = "电子签章名称", dataType = "String")
    private String signName;

    @TableField(exist = false)
    @ApiModelProperty(value = "认可标志专用章名称", dataType = "String")
    private String approvalSignName;

    @TableField(exist = false)
    @ApiModelProperty(value = "模板名称", dataType = "String")
    private String templateName;

    @TableField(exist = false)
    @ApiModelProperty(value = "证书类型名称", dataType = "String")
    private String certificateReportTypeName;

}
