package com.zt.plat.module.qms.thirdpartyapi.controller.vo;

import java.io.Serializable;
import java.time.LocalDateTime;

import org.springframework.format.annotation.DateTimeFormat;

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.LocalDateTimeSerializer;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

@Data
public class ConfigXRFLineCustomRespVO implements Serializable {

	private static final long serialVersionUID = 4827957658423219091L;

    @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10711")
    private Long id;

    @Schema(description = "设备编号", requiredMode = Schema.RequiredMode.REQUIRED)
    private String deviceNo;

    @Schema(description = "荧光线名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
    private String lineName;

    @Schema(description = "是否启用,0、未启用；1、启用；")
    private Integer isUse;

    @Schema(description = "连接字符串")
    private String connectString;

    @Schema(description = "数据源类型,（1：rdb,2：mdb）", example = "1")
    private Integer dataSourceType;

    @Schema(description = "末次同步数据时间")
    @JsonSerialize(using = LocalDateTimeSerializer.class) // 序列化（响应）
    @JsonDeserialize(using = LocalDateDeserializer.class) // 反序列化（请求）
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime lastSynchronousDataTime;

    @Schema(description = "末次检查数据时间")
    @JsonSerialize(using = LocalDateTimeSerializer.class) // 序列化（响应）
    @JsonDeserialize(using = LocalDateTimeDeserializer.class) // 反序列化（请求）
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime lastCheckDataTime;

    @Schema(description = "所属部门")
    private String systemDepartmentCode;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @JsonSerialize(using = LocalDateTimeSerializer.class) // 序列化（响应）
    @JsonDeserialize(using = LocalDateDeserializer.class) // 反序列化（请求）
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "备注")
    private String remark;
}
