package com.xhpc.evcs.dto;

import com.fasterxml.jackson.annotation.*;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;

import javax.persistence.Transient;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
        "StationID",
        "OperatorID",
        "EquipmentOwnerID",
        "StationName",
        "CountryCode",
        "AreaCode",
        "Address",
        "ServiceTel",
        "StationType",
        "StationStatus",
        "ParkNums",
        "StationLng",
        "StationLat",
        "Construction",
        "BusineHours",
        "ElectricityFee",
        "ServiceFee",
        "ParkFee",
        "Payment",
        "SupportOrder",
        "EquipmentInfos"
})
@Getter
@Setter
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE,
        setterVisibility = JsonAutoDetect.Visibility.NONE, creatorVisibility = JsonAutoDetect.Visibility.NONE)
public class StationInfo extends CommonStationInfo {

    @Transient
    @JsonProperty("AreaCode")
    public String areaCode;
    @Transient
    @JsonProperty("Address")
    public String address;
    @Transient
    @JsonProperty("ServiceTel")
    public String serviceTel;
    @Transient
    @JsonProperty("StationType")
    public Integer stationType;
    @Transient
    @JsonProperty("StationStatus")
    public Integer stationStatus;
    @Transient
    @JsonProperty("ParkNums")
    public Integer parkNums;
    @Transient
    @JsonProperty("StationLng")
    public Double stationLng;
    @Transient
    @JsonProperty("StationLat")
    public Double stationLat;
    @Transient
    @JsonProperty("Construction")
    public Long construction;
    @Transient
    @JsonProperty("BusineHours")
    public String busineHours;
    @Transient
    @JsonProperty("ElectricityFee")
    public String electricityFee;
    @Transient
    @JsonProperty("ServiceFee")
    public String serviceFee;
    @Transient
    @JsonProperty("ParkFee")
    public String parkFee;
    @Transient
    @JsonProperty("Payment")
    public String payment;
    @Transient
    @JsonProperty("SupportOrder")
    public Long supportOrder;
    @Transient
    @JsonProperty("EquipmentInfos")
    public List<EquipmentInfo> equipmentInfos = null;
    @Transient
    @JsonIgnore
    private Map<String, Object> additionalProperties = new HashMap<String, Object>();

    @JsonAnyGetter
    public Map<String, Object> getAdditionalProperties() {

        return this.additionalProperties;
    }

    @JsonAnySetter
    public void setAdditionalProperty(String name, Object value) {

        this.additionalProperties.put(name, value);
    }

    @Override
    public String toString() {
        return "StationInfo{" +
                "areaCode='" + areaCode + '\'' +
                ", address='" + address + '\'' +
                ", serviceTel='" + serviceTel + '\'' +
                ", stationType=" + stationType +
                ", stationStatus=" + stationStatus +
                ", parkNums=" + parkNums +
                ", stationLng=" + stationLng +
                ", stationLat=" + stationLat +
                ", construction=" + construction +
                ", busineHours='" + busineHours + '\'' +
                ", electricityFee='" + electricityFee + '\'' +
                ", serviceFee='" + serviceFee + '\'' +
                ", parkFee='" + parkFee + '\'' +
                ", payment='" + payment + '\'' +
                ", supportOrder=" + supportOrder +
                ", equipmentInfos=" + equipmentInfos +
                ", additionalProperties=" + additionalProperties +
                '}';
    }
}
