package com.willalp.yiqing.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.willalp.common.annotation.Excel;
import com.willalp.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 核酸检测结果对象 hs_yiqing_rns_result
 *
 * @author willalp
 * @date 2022-05-18
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("hs_yiqing_rns_result")
public class HsYiqingRnsResult extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId
    private String id;

    /**
     * 日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date samplingTime;

    /**
     * 对应人员ID
     */
    private String userDataId;

    /**
     * 核酸结果
     */
    @Excel(name = "核酸结果")
    private String rnaResult;

    /**
     * 测定值
     */
    @Excel(name = "测定值")
    private String ctValue;

    /**
     * 抗原结果
     */
    @Excel(name = "抗原结果")
    private String antigenResult;

    /**
     * 分类
     */
    @Excel(name = "核酸分类")
    private String sort;

    /**
     * 检验时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "检验时间", width = 15, dateFormat = "yyyy-MM-dd")
    private Date resultTime;

    @Excel(name = "ORF1ab基因（SS）")
    private String excelT1;

    @Excel(name = "N基因（SS）")
    private String excelT2;

    /**
     * 是否删除（0.未删除；1.已删除）
     */
    @TableLogic
    private Integer isDelete;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("samplingTime", getSamplingTime())
                .append("userDataId", getUserDataId())
                .append("sort", getSort())
                .append("resultTime", getResultTime())
                .append("rnaResult", getRnaResult())
                .append("ctValue", getCtValue())
                .append("antigenResult", getAntigenResult())
                .append("isDelete", getIsDelete())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
