package digital.laboratory.platform.inspection.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import digital.laboratory.platform.common.mybatis.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

/**
 * 样本检验数据
 * @TableName b_test_record_sampledata
 */
@Data
@TableName(value ="b_test_record_sampledata",  autoResultMap = true)
@ApiModel(value = "实验中样本检测结果数据", description = "实验中样本检测结果数据")
public class TestRecordSampleData extends BaseEntity {

    @ApiModelProperty(value = "主键标识", example = "123456789")
    @TableId(value = "ID", type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty(value = "数据从机器中导出的唯一标识", example = "Sample123")
    private String name;

    @ApiModelProperty(value = "样本编号", example = "SMP001")
    private String sampleNo;

    @ApiModelProperty(value = "实验ID", example = "TEST001")
    private String testId;

    @ApiModelProperty(value = "标准品浓度", example = "10.5")
    private String stdConcentration;

    @ApiModelProperty(value = "样品浓度", example = "8.9")
    private String sampleConcentration;

    @ApiModelProperty(value = "化合物名称", example = "Heroin")
    private String compoundName;

    @ApiModelProperty(value = "保留时间是否在误差范围内，缴获物(-1~1), 生物样本(-2.5~2.5)", example = "0.5")
    private String rtTimeWithinError;

    @ApiModelProperty(value = "保留时间相对误差(%)", example = "1.2")
    private BigDecimal rtTimeError;

    @ApiModelProperty(value = "检材保留时间(min)", example = "2.5")
    private Double targetRtTime;

    @ApiModelProperty(value = "标准品保留时间(min)", example = "2.6")
    private Double stdRtTime;

    @ApiModelProperty(value = "是否检出该物质 1 检出, 0 未检出", example = "1")
    private Integer isDetected;

    @ApiModelProperty(value = "样本类型 - QC(质控), STD(标准品), Analyte(待测样品)", example = "QC")
    private String sampleType;

    @ApiModelProperty(value = "检验数据 JSON", example = "{\"mass\": 146, \"intensity\": 200}")
    private String dataJson;

    @ApiModelProperty(value = "检验结果数据 JSON", example = "{\"result\": \"Positive\"}")
    private String dataResultJson;

    @ApiModelProperty(value = "状态：0-待审核, 1-已审核, 2-已审批, 3-已上传", example = "1")
    private Integer status;

    @ApiModelProperty(value = "检测的化合物的中文名字", example = "海洛因")
    private String compoundCnName;

    @ApiModelProperty("是否检出, 定性结果")
    private String whetherCheckOut;

}
