package com.xhpc.evcs.cdjgpc.dto;

import com.fasterxml.jackson.annotation.*;
import com.xhpc.evcs.dto.ConnectorInfo;
import com.xhpc.evcs.dto.EquipmentInfo;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Transient;
import java.util.List;

/**
 * @author yuyang
 * @date 2023-09-07 14:40
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
        "EquipmentID",
        "ManufacturerID",
        "ManufacturerName",
        "EquipmentModel",
        "EquipmentProductCode",
        "TransformerID",
        "EquipmentName",
        "ProductionDate",
        "ConstructionTime",
        "EquipmentType",
        "EquipmentStatus",
        "EquipmentPurpose",
        "EquipmentPower",
        "NewNationalStandard",
        "ConnectorInfos",
        "VinFlag",
        "EquipmentClassificatlon"
})
@Data
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE,
        setterVisibility = JsonAutoDetect.Visibility.NONE, creatorVisibility = JsonAutoDetect.Visibility.NONE)
public class CDEquipmentInfo {

    /**
     * 设备编码
     */
    @JsonProperty("EquipmentID")
    public String equipmentID;
    /**
     * 设备生产商组织机构代码
     */
    @JsonProperty("ManufacturerID")
    public String manufacturerID;
    /**
     * 设备生产商名称
     */
    @JsonProperty("ManufacturerName")
    public String manufacturerName;
    /**
     * 设备型号
     */
    @Transient
    @JsonProperty("EquipmentModel")
    public String equipmentModel;
    /**
     * 设备出厂编码
     */
    @JsonProperty("EquipmentProductCode")
    public String equipmentProductCode;
    /**
     * 变压器户号
     */
    @JsonProperty("TransformerID")
    public String transformerID;
    /**
     * 设备名称
     */
    @JsonProperty("EquipmentName")
    public String equipmentName;
    /**
     * 设备生产日期
     */
    @JsonProperty("ProductionDate")
    public String productionDate;
    /**
     * 建设时间
     */
    @JsonProperty("ConstructionTime")
    public String constructionTime;
    /**
     * 设备类型
     */
    @JsonProperty("EquipmentType")
    public Integer equipmentType;
    /**
     * 设备状态
     */
    @JsonProperty("EquipmentStatus")
    public Integer equipmentStatus;
    /**
     * 设备用途
     */
    @JsonProperty("EquipmentPurpose")
    public Integer equipmentPurpose;
    /**
     * 额定功率
     */
    @JsonProperty("EquipmentPower")
    @Column(columnDefinition = "Decimal(10,1)")
    public Double equipmentPower;
    /**
     * 新国标
     */
    @JsonProperty("NewNationalStandard")
    public Integer newNationalStandard;
    /**
     * 充电设备 接口列表
     */
    @JsonProperty("ConnectorInfos")
    public List<CDConnectorInfo> connectorInfos;
    /**
     * 充 电 设 备 经度
     */
//    @JsonProperty("EquipmentLng")
//    public Double equipmentLng;
    /**
     * 充电设备 纬度
     */
//    @JsonProperty("EquipmentLat")
//    public Double equipmentLat;
    /**
     * 是否支持  VIN 码识别
     */
    @JsonProperty("VinFlag")
    public Integer vinFlag;
    /**
     * 设备分类
     */
    @JsonProperty("EquipmentClassificatlon")
    public Integer equipmentClassificatlon;
//    /**
//     * 是否支持 V2G
//     */
//    @JsonProperty("V2GSupport")
//    public Integer v2GSupport;

}
