package com.xhpc.evcs.cdjgpc.dto;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Transient;

/**
 * @author yuyang
 * @date 2023-09-27 17:35
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
        "ConnectorID",
        "ConnectorName",
        "ConnectorType",
        "VoltageUpperLimits",
        "VoltageLowerLimits",
        "Current",
        "Power",
        "NationalStandard",
        "EquipmentClassification",
        "AuxPower",
        "OpreateStatus"
})
@Data
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE,
        setterVisibility = JsonAutoDetect.Visibility.NONE, creatorVisibility = JsonAutoDetect.Visibility.NONE)
public class CDConnectorInfo {

    @JsonProperty("ConnectorID")
    public String connectorID;
    @JsonProperty("ConnectorName")
    public String connectorName;
    // 1：家用插座（模式 2）
    // 2：交流接口插座（模式 3， 连接方式 B ）
    // 3：交流接口插头（带枪线， 模式 3，连接方式 C）
    // 4：直流接口枪头（带枪线， 模式 4）
    // 5：无线充电座
    // 6：其他
    @JsonProperty("ConnectorType")
    public Integer connectorType;
    @JsonProperty("VoltageUpperLimits")
    public Integer voltageUpperLimits;
    @JsonProperty("VoltageLowerLimits")
    public Integer voltageLowerLimits;
    @JsonProperty("Current")
    public Integer current;

    @Column(columnDefinition = "Decimal(10,1)")
    @JsonProperty("Power")
    public Double power;

//    @Column(columnDefinition = "Decimal(10,1)")
//    @JsonProperty("ConstantVoltageUpperLimits")
//    public Double constantVoltageUpperLimits;
//
//    @Column(columnDefinition = "Decimal(10,1)")
//    @JsonProperty("ConstantVoltageLowerLimits")
//    public Double constantVoltageLowerLimits;
//
//    @Column(columnDefinition = "Decimal(10,1)")
//    @JsonProperty("ConstantCurrentUpperLimits")
//    public Double constantCurrentUpperLimits;
//
//    @Column(columnDefinition = "Decimal(10,1)")
//    @JsonProperty("ConstantCurrentLowerLimits")
//    public Double constantCurrentLowerLimits;

//    @JsonProperty("ParkNo")
//    public String ParkNo;

    @JsonProperty("NationalStandard")
    public Integer nationalStandard;
    /**
     * 设备接口分类
     */
    @Transient
    @JsonProperty("EquipmentClassification")
    public Integer equipmentClassification;
    /**
     * 辅助电源
     */
    @Transient
    @JsonProperty("AuxPower")
    public Integer auxPower;
    /**
     * 运营状态
     */
    @Transient
    @JsonProperty("OpreateStatus")
    public Integer opreateStatus;

//    @JsonProperty("OperateHours")
//    public String operateHours;
}
