package digital.laboratory.platform.imr.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 lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 
 *
 * @author Zhang Xiaolong created at  2023-03-27 14:50:05
 * @describe  实体类
 *
 * 样本存储实体类
 * 外建表格关联,样本入库时录入
 * 录入要判断
 */
@Data
@TableName(value = "b_sample_storage", autoResultMap = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "样本存储")
public class SampleStorage extends BaseEntity {

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    @ApiModelProperty(value="主键id")
    private String id;

    /**
     * 存储的样本id
     */
    @ApiModelProperty(value="存储的样本id")
    private String sampleId;

    /**
     * 存储位置
     */
    @ApiModelProperty(value="存储位置")
    private String storageLocation;

    /**
     * 状态:已出库/已入库/待存放
     */
    @ApiModelProperty(value="状态:/1.已入库待存放/2.已入库已存放 3.已出库")
    private Integer status;

    /**
     * 存储期限
     */
    @ApiModelProperty(value="存储期限")
    private LocalDateTime storageDate;


    /**
     * 存放人;拿来入库的人
     */
    @ApiModelProperty(value="存放人ID")
    private String depositorId;


    /**
     * 领取人id
     */
    @ApiModelProperty(value="领取人")
    private String recipientId;


    /**
     * 入库时间
     */
    @ApiModelProperty(value="入库时间")
    private LocalDateTime inRepositoryDate;

    /**
     * 出库时间
     */
    @ApiModelProperty(value="出库时间")
    private LocalDateTime outRepositoryDate;


    /**
     * 存储格子id
     */
    @ApiModelProperty(value="存储格子id")
    private String storageCellId;


    /**
     * 销毁标识
     */
    @ApiModelProperty(value="销毁标识")
    private Integer earlyWarning;  //预留的字段 0.还未到销毁;1.已到销毁时间;(2.销毁审核通过;--后端业务字段)


    /**
     * 质量/体积
     */
    @ApiModelProperty(value="质量/体积")
    private BigDecimal quality;


    /**
     * 计量单位
     */
    @ApiModelProperty(value="计量单位")
    private String unit;

    @ApiModelProperty(value="样本名称")
    private String name;

    @ApiModelProperty(value = "样本类型")
    private String sampleType;


    @ApiModelProperty(value = "是否需要归还(-1不需要;1.需要归还)")
    private Integer isReturn;


    @ApiModelProperty(value = "归还时间")
    private LocalDate returnTime;


    @ApiModelProperty(value = "出库用途")
    private String purpose;


    @ApiModelProperty(value="楼层")
    private String buildingLv;

    @ApiModelProperty(value="房间号")
    private String roomNo;

    @ApiModelProperty(value="柜子名称")
    private String cabinetName;

    @ApiModelProperty(value="柜子id")
    private String boxId;


}
