/*
 * 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.mybatisplus.config.ToflySqlCondition;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.data.annotation.Transient;
import org.springframework.format.annotation.DateTimeFormat;

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


/**
 * 化验项配置
 *
 * @author admin
 * @date Wed Nov 02 00:00:00 CST 2022
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "TF_WATERQUALITY_ASSAY_CONFIG_D", resultMap = "assayConfigDMap")

@ApiModel
public class AssayConfigD extends Model<AssayConfigD> {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "配置化验项字典id值，多个逗号分开")
    @TableField(exist=false)
    @NotNull(message = "关联化验项字典不能为空")
    private String configAssayDicIds;

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

    @ApiModelProperty(hidden = true,value = "化验项字典列表")
    @TableField(exist=false)
    private  List<AssayDicD> listAssayDic;

    /**
     * 化验项配置名称
     */
    @ApiModelProperty(value = "化验项配置名称")
    @NotNull(message = "化验项配置名称不能为空")
    private String assayConfigName;
    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    @TableField(value = "CREATE_USER", fill = FieldFill.INSERT)
    private Long createUser;
    @ApiModelProperty(value = "创建人姓名", hidden = true)
    @TableField(exist=false)
    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(value = "跟新人员姓名", hidden = true)
    @TableField(exist=false)
    private String updateUserName;
    /**
     * 描述
     */
    @ApiModelProperty(value = "描述")
    private String remark;


}
