package com.ruoyi.web.v3.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("hb_sampling_retained")
@ApiModel(value="hbSamplingRetained", description="v3.0 留样记录")
public class HbSamplingRetainedEntity {

    @ApiModelProperty(value = "序号")
    private Integer sequenceNo;

    @ApiModelProperty(value = "留样编号")
    private String samplingNo;

    @ApiModelProperty(value = "生产日期")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime productionDate;

    @ApiModelProperty(value = "留样时间")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime samplingDate;

    @ApiModelProperty(value = "留样数量")
    private Integer samplingQuantity;

    @ApiModelProperty(value = "留样人")
    private String chargePerson;

    @ApiModelProperty(value = "检测项目")
    private String examineItem;

    @ApiModelProperty(value = "水分值")
    private String moisture;

    @ApiModelProperty(value = "清除时间")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime clearDate;

    @ApiModelProperty(value = "清除人")
    private String clearPerson;

    @ApiModelProperty(value = "留样去向")
    private String samplingDestination;


}
