package com.kym.entity.platform;

import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.annotation.JSONCreator;
import com.alibaba.fastjson2.annotation.JSONField;
import lombok.Data;

import java.util.List;

/**
 * @author skyline
 * @description
 * @date 2023-07-31 16:00
 */
@Data
public class PlatformStationStatusInfo {
    /**
     * 充电站ID（20字符，运营商自定义的唯一编码，不足长度在前方补0）
     */
    @JSONField(name = "StationID")
    private String stationId;

    /**
     * 充电设备接口状态列表
     */
    private List<PlatformConnectorStatusInfo> connectorStatusInfos;

    @JSONCreator
    public PlatformStationStatusInfo(@JSONField(name = "connectorStatusInfos") JSONArray infos) {
        this.connectorStatusInfos = infos.toJavaList(PlatformConnectorStatusInfo.class);
    }

}
