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

import com.alibaba.fastjson.JSONObject;
import com.zt.plat.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

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

@Schema(description = "管理后台 - 设备-设备信息分页 Request VO")
@Data
public class DeviceInfomationPageReqVO extends PageParam {

    @Schema(description = "id", example = "32101")
    private Long id;

    @Schema(description = "设备大类id", example = "32101")
    private Long productId;

    @Schema(description = "设备名称", example = "张三")
    private String deviceName;

    @Schema(description = "别名")
    private String alias;

    @Schema(description = "设备状态", example = "2")
    private String deviceStatus;

    @Schema(description = "使用中状态")
    private String inUseFlag;

    @Schema(description = "等级分类")
    private String gradeCategory;

    @Schema(description = "数量")
    private String deviceNumber;

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

    @Schema(description = "资产编号")
    private String assetCode;

    @Schema(description = "出厂编号")
    private String factoryCode;

    @Schema(description = "存放位置")
    private String position;

    @Schema(description = "购入价格", example = "25826")
    private BigDecimal purchasePrice;

    @Schema(description = "采购时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] purchaseDate;

    @Schema(description = "生产时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] productiveDate;

    @Schema(description = "安装日期")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] deployDate;

    @Schema(description = "安装工程师")
    private String deployEngineer;

    @Schema(description = "安装位置")
    private String deployLocation;

    @Schema(description = "验收人员id", example = "26830")
    private String acceptanceUserId;

    @Schema(description = "验收人员", example = "李四")
    private String acceptanceUserName;

    @Schema(description = "负责人ID", example = "1902")
    private String managerUserId;

    @Schema(description = "负责人", example = "芋艿")
    private String managerUserName;

    @Schema(description = "自定义表单数据")
    private String customFormData;

    @Schema(description = "设备图片")
    private String photo;

    @Schema(description = "技术指标")
    private String deviceParameter;

    @Schema(description = "状态（显示）")
    private String stateShow;

    @Schema(description = "状态栈")
    private String stateStack;

    @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 = "是否连接")
    private String isConnect;

    @Schema(description = "上次连接时间")
    private LocalDateTime[] lastConnectTime;

    @Schema(description = "数据采集设备类型")
    private String collectDeviceType;
    //===================扩展属性==============
    @Schema(description = "大类ids")
    List<Long> productIds;

    @Schema(description = "设备状态JSON")
    JSONObject deviceStatusJson;

}