package digital.laboratory.platform.inspection.entity;

import com.alibaba.fastjson.JSONArray;
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 digital.laboratory.platform.inspetion.api.entity.MaterialDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

/*
 *@title TaskInfo
 *@description  任务信息实体
 *@author xy
 *@version 1.0
 *@create 2023/12/7 15:17
 */
@Data
@TableName(value = "b_taskInfo", autoResultMap = true)
@ApiModel(value = "任务信息", description = "任务信息")
public class TaskInfo extends BaseEntity {
    private String id;
    private String taskName;//任务名称
    private String businessType;//业务类型
    private LocalDateTime taskStartDate;//任务开始日期
    private LocalDateTime taskEndDate;//任务截止日期
    private Integer source;//0,系统录入  1，手工录入
    private String originalId;//原任务ID 可能是污水任务或者毛发任务
    private String distributionSituation; //区分是否已被分配以及分配的数量

    private String compounds;//[{"compound1":"aaaa","english":"ab-fui"}]

    @ApiModelProperty(value = "生成报告的配置")
    @TableField(value = "report_config", typeHandler = FastjsonTypeHandler.class)
    private JSONArray reportConfig;

    @TableField(exist = false)
    List<MaterialDto> materialList;

    @TableField(exist = false)
    private String businessTypeName;

    @TableField(exist = false)
    // 化合物json数组
    private JSONArray compoundsJsonArray;
    
    @TableField(exist = false)
    private Boolean isDistribution;

}
