package com.zt.plat.module.qms.resource.device.controller.vo;

import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.zt.plat.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;

import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - 设备-使用记录分页 Request VO")
@Data
public class DeviceUseRecordPageReqVO extends PageParam {

    @Schema(description = "设备id", example = "5771")
    private Long deviceId;

    @Schema(description = "使用人", example = "王五")
    private String userName;

    @Schema(description = "使用人id", example = "11450")
    private Long userId;

    @Schema(description = "开始使用时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] useTimeStart;

    @Schema(description = "结束使用时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] useTimeEnd;

    @Schema(description = "使用记录")
    private String useRemark;

    @Schema(description = "检测项目")
    private String useItem;

    @Schema(description = "使用前状态")
    private String stateBefore;

    @Schema(description = "使用中状态（正常/异常）")
    private String stateRun;

    @Schema(description = "使用后状态")
    private String stateAfter;

    @Schema(description = "温度")
    private String temperature;

    @Schema(description = "湿度")
    private String humidity;

    @Schema(description = "数据来源,PC|PAD|PDA")
    private String dataSource;

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

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

    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] createTime;

    //=====================================扩展字段===============================================

    @Schema(description = "产品id")
    private Long productId;

    @Schema(description = "设备名称")
    private String deviceName;

    @Schema(description = "管理编号")
    private String deviceCode;

    @Schema(description = "使用部门")
    private String deptName;

    //===============查询字段=========

    @Schema(description = "产品id查询")
    private List<Long> productIdList;

    @Schema(description = "设备ID列表")
    private List<Long> deviceIdList;

    @Schema(description = "结束时间为空判断： 0-为空；1-不为空")
    private String useTimeEndFlag;

}