/*
 * Author: wangjian
 * 生成entity
 */
package com.tofly.quality.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.tofly.quality.entity.comm.File;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.ibatis.type.JdbcType;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.util.List;
import java.util.stream.Collectors;


/**
 * 化验报告管理
 *
 * @author admin
 * @date Thu Nov 03 00:00:00 CST 2022
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "TF_WATERQUALITY_ASSAY_REPORT_W", resultMap = "assayReportWMap")
@ApiModel
public class AssayReportW extends Model<AssayReportW> {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "ID", type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 报告编号
     */
    @ApiModelProperty(value = "报告编号")
    private String reportNo;

    /**
     * 化验结果ID
     */
    @ApiModelProperty(value = "化验结果ID")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long assayResultId;

    @ApiModelProperty(value = "报告标题")
    @NotNull(message = "报告报告标题不能为空")
    private String reportTitle;
    /**
     * 报告类型关联
     */
    @ApiModelProperty(value = "报告类型关联")
    @NotNull(message = "报告类型不能为空")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long reportTypeId;

    @ApiModelProperty(hidden = true, value = "报告类型名称")
    @TableField(exist = false)
    private String reportTypeName;
    /**
     * 环境信息
     */
    @ApiModelProperty(value = "环境信息")
    @TableField(jdbcType = JdbcType.VARCHAR,updateStrategy = FieldStrategy.IGNORED)
    private String environmentInfo;
    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    @TableField(jdbcType = JdbcType.VARCHAR,updateStrategy = FieldStrategy.IGNORED)
    private String remark;
    /**
     * 归档状态 0未归档，1归档
     */
    @ApiModelProperty(value = "归档状态 0未归档，1归档")
    private String fileState;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    @TableField(value = "CREATE_USER", fill = FieldFill.INSERT)
    private Long createUser;
    @ApiModelProperty(hidden = true)
    private String createUserName;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "CREATE_TIME", fill = FieldFill.INSERT)
    private Date createTime;
    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "UPDATE_TIME", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    /**
     * 更新人员
     */
    @ApiModelProperty(value = "更新人员")
    @TableField(value = "UPDATE_USER", fill = FieldFill.INSERT_UPDATE)
    private Long updateUser;
    @ApiModelProperty(hidden = true)
    private String updateUserName;
    /**
     * IDS，多个附件id用英文等号分割“,”,关联公共文件表TF_YWPN_FILE _W主键
     */
    @ApiModelProperty(value = "IDS，多个附件id用英文等号分割“,”,关联公共文件表TF_YWPN_FILE _W主键")
    private String uploadFileids;

    @ApiModelProperty(hidden = true,value = "文件路径列表")
    @TableField(exist = false)
    private List<File> fileUpLoadList;


    /**
     * 采样点名称
     */
    @ApiModelProperty(value = "采样点名称",hidden = true)
   @TableField(exist = false)
    private String samplePlaceName;
}
