package digital.laboratory.platform.inspection.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import digital.laboratory.platform.common.mybatis.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 标准溶液实体类。
 *
 * 该类表示在实验过程中配置的标准溶液的相关信息。
 */
@Data
@TableName(value = "b_test_record_standard_solution", autoResultMap = true)
@ApiModel(value = "TestRecordStandardSolution", description = "实验中配置的标准溶液")
public class TestRecordStandardSolution extends BaseEntity {

    @ApiModelProperty(value = "标准溶液ID")
    private String id;

    @ApiModelProperty(value = "标准溶液编号")
    private String number;

    @ApiModelProperty(value = "用到的标准物质名称，例如：甲基苯丙胺")
    private String standardName;

    @ApiModelProperty(value = "稀释物质名称，例如：甲醇")
    private String dilutionName;

    @ApiModelProperty(value = "定容体积")
    private String constantVolume;

    @ApiModelProperty(value = "稀释倍数")
    private String dilutionFactor;

    @ApiModelProperty(value = "原始浓度")
    private String originalConcentration;

    @ApiModelProperty(value = "结果浓度")
    private String resultConcentration;

    @ApiModelProperty(value = "结果浓度单位")
    private String resultConcentrationUnit;

    @ApiModelProperty(value = "称取质量/移取体积")
    private String weighingMoving;

    @ApiModelProperty(value = "检验ID")
    private String testId;

    @ApiModelProperty(value = "选取标准物质数量(如果=1，则为单个标准物质溶液；如果>1，则为混合标准溶液；==0，则为空白溶液)")
    private Integer standardSubstanceCount;

    @ApiModelProperty(value = "制备日期")
    private LocalDateTime madeDate;

    @ApiModelProperty(value = "有效期")
    private LocalDateTime expirationDate;

    @ApiModelProperty(value = "溶液类型（如质控溶液QC、标准工作溶液STD、空白溶液BLK）")
    private String solutionType;

    @ApiModelProperty(value = "英文名，用于生成溶液编号")
    private String englishName;

    @TableField(typeHandler = FastjsonTypeHandler.class)
    @ApiModelProperty(value = "标准物质ID数组")
    private List<String> standardSubstanceNumList;

    @TableField(exist = false)
    @ApiModelProperty(value = "打印制备日期", hidden = true)
    private String madeDatePrint;

    @TableField(exist = false)
    @ApiModelProperty(value = "打印有效期", hidden = true)
    private String expirationDatePrint;
}