package com.njcn.gather.aireport.testdevice.pojo.vo;

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.LocalDateDeserializer;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
public class TestDeviceVO {
    @ApiModelProperty("检测设备ID")
    private String id;
    @ApiModelProperty("设备型号ID")
    private String type;
    @ApiModelProperty("设备型号名称")
    private String typeName;
    @ApiModelProperty("设备编号")
    private String no;
    @ApiModelProperty("校准有效期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @JsonDeserialize(using = LocalDateDeserializer.class)
    @JsonSerialize(using = LocalDateSerializer.class)
    private LocalDate validityPeriod;
    @ApiModelProperty("校准报告存储路径")
    private String validityReport;
    @ApiModelProperty("校准报告文件名")
    private String validityReportName;
    @ApiModelProperty("校准报告下载地址")
    private String validityReportUrl;
    @ApiModelProperty("设备状态，01-在运，02-退役")
    private String state;
    @ApiModelProperty("逻辑状态")
    private Integer status;
    @ApiModelProperty("创建人ID")
    private String createBy;
    @ApiModelProperty("创建人显示名")
    private String createByName;
    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime createTime;
    @ApiModelProperty("更新人ID")
    private String updateBy;
    @ApiModelProperty("更新人显示名")
    private String updateByName;
    @ApiModelProperty("更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime updateTime;
}
