package com.zksy.base.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

/**
 * 设备全信息VO — 联查管线→管点→设备→状态
 */
@Data
public class EquipmentFullVO {

    // ===== equipment_base =====
    @ApiModelProperty("设备ID")
    private String equipmentId;

    @ApiModelProperty("设备编码")
    private String equipmentCode;

    @ApiModelProperty("设备名称")
    private String equipmentName;

    @ApiModelProperty("设备型号")
    private String equipmentModel;

    @ApiModelProperty("规格参数")
    private String equipmentSpec;

    @ApiModelProperty("所属片区（城南/城北/太常）")
    private String district;

    @ApiModelProperty("制造商")
    private String manufacturer;

    @ApiModelProperty("生产日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date productionDate;

    @ApiModelProperty("设备类别ID")
    private String equipmentTypeId;

    @ApiModelProperty("设备类别名称")
    private String equipmentTypeName;

    @ApiModelProperty("资产价值")
    private Double assetValue;

    @ApiModelProperty("使用年限")
    private Integer useLife;

    @ApiModelProperty("经度")
    private BigDecimal longitude;

    @ApiModelProperty("纬度")
    private BigDecimal latitude;

    @ApiModelProperty("安装位置")
    private String equipmentLocation;

    @ApiModelProperty("安装时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime installTime;

    @ApiModelProperty("设备负责人")
    private String maintainer;

    @ApiModelProperty("联系方式")
    private String maintainerPhone;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("设备图片URL")
    private String equipmentImage;

    @ApiModelProperty("权属单位")
    private String ownershipUnit;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    // ===== equipment_status =====
    @ApiModelProperty("设备当前状态：1-在用，2-闲置，3-维修，4-报废，5-待入库")
    private Integer currentStatus;

    @ApiModelProperty("报警状态：0-正常，1-报警")
    private Integer alarmStatus;

    @ApiModelProperty("在线状态：0-离线，1-在线")
    private Integer onlineStatus;

    @ApiModelProperty("最后一次维护日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date lastMaintainDate;

    @ApiModelProperty("下次预计维护日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date nextMaintainDate;

    // ===== gas_pipe_point =====
    @ApiModelProperty("管点ID")
    private Long pointId;

    @ApiModelProperty("管点编码")
    private String pointCode;

    @ApiModelProperty("管点名称")
    private String pointName;

    @ApiModelProperty("管点类型")
    private String pointType;

    @ApiModelProperty("管点地址")
    private String pointAddress;

    // ===== pipe_network_base =====
    @ApiModelProperty("管线ID")
    private String networkId;

    @ApiModelProperty("管线编码")
    private String networkCode;

    @ApiModelProperty("管线名称")
    private String networkName;

    @ApiModelProperty("管线类型")
    private String networkType;

    @ApiModelProperty("管线等级")
    private String networkLevel;
}
