package com.ruoyi.web.v3.model.request;

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 com.ruoyi.web.v3.model.BasePageRequest;
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.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;


@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="HbRiskCheckWeeklyPageReq", description="v3.0 隐患风险点检记录（周次）")
public class HbRiskCheckWeeklyPageReq extends BasePageRequest implements Serializable {

    @ApiModelProperty(value = "数据唯一性标识id")
    private String id;

    @ApiModelProperty(value = "岗位名称")
    private String jobTitle;


    @ApiModelProperty(value = "编号")
    private String recordNo;

    @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 checkDate;


    @ApiModelProperty(value = "月份周区间")
    private String weekSection;


    @ApiModelProperty(value = "排查结果(0:未通过 1:已通过)")
    private Boolean isChecked;


    @ApiModelProperty(value = "检查人(签字)")
    private String inspectorConfirm;


    @ApiModelProperty(value = "异常情况记录")
    private String unusualCaseDetail;


    @ApiModelProperty(value = "备注")
    private String remarks;

    @ApiModelProperty(value = "起始日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private LocalDate startTime;

    @ApiModelProperty(value = "截至日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private LocalDate endTime;
}
