package digital.laboratory.platform.inspetion.api.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.annotation.JSONType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import digital.laboratory.platform.common.mybatis.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDate;
import java.util.List;

/*
 *@title TestRecord
 *@description  检验记录
 *@author xy
 *@version 1.0
 *@create 2023/12/18 9:39
 */
@Data
@TableName(value = "b_test_record", autoResultMap = true)
@ApiModel(value = "检验记录", description = "检验记录")
public class TestRecord extends BaseEntity {
    @ApiModelProperty(value = "id")
    private String id;
    @ApiModelProperty(value = "待检验样本ID")
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private List<String> sampleTestList;//待检验样本ID
    @ApiModelProperty(value = "使用到的设备ID")
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private List<String> deviceIdList;//使用到的设备ID

    @ApiModelProperty(value = "使用到的试剂耗材")
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private List<String> reagentConsumablesList;//使用到的试剂耗材

    @ApiModelProperty(value = "使用到的标准溶液")
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private List<String> standardSolution;//使用到的标准溶液

    @ApiModelProperty(value = "使用到的样本溶液")
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private List<String> sampleSolution;//使用到的样本溶液

    @ApiModelProperty(value = "使用到的检验方法")
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private List<String> testMethodList;//使用到的检验方法
    @ApiModelProperty(value = "仪器设备使用条件")
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private List<String> deviceUseCondition;//仪器设备使用条件
    @ApiModelProperty(value = "检验人")
    private String testUserId;//检验人

    @ApiModelProperty(value = "检验编号")
    private String testSerialNumber;//检验编号

    @ApiModelProperty(value = "样本溶液处理过程")
    private String sampleSolutionProcessing;//样本溶液处理过程

    @ApiModelProperty(value = "标准溶液处理过程")
    private String standardSolutionProcessing;//标准溶液处理过程

    @ApiModelProperty(value = "检验过程描述")
    private String testProcessDes;//检验过程描述

    @ApiModelProperty(value = "模板名称")
    private String templateName;//模板名称

    @ApiModelProperty(value =
            "创建实验：0\n" +
                    "正在上机：1\n" +
                    "结果分析：2\n" +
                    "提交审核：3\n" +
                    "提交审批：4\n" +
                    "实验完成：5\n" +
                    "出具文书：6")
    private Integer status;

    @ApiModelProperty(value = "实验类型(业务类型)")
    private String businessType;

    @ApiModelProperty(value = "实验图谱-存储图谱文件名，一般为pdf，格式为['p1.pdf,p2.pdf']")
    private String testAtlas;

    @ApiModelProperty("实验开始时间")
    @JsonFormat(pattern = "yyyy/MM/dd", timezone = "GMT+8")
    private LocalDate testStartDate;

    @ApiModelProperty("实验结束时间")
    @JsonFormat(pattern = "yyyy/MM/dd", timezone = "GMT+8")
    private LocalDate testEndDate;

    @ApiModelProperty("业务Id，特指委托ID")
    private String businessId;
}
