package com.emato.ich.entity;

import com.fasterxml.jackson.annotation.JsonAlias;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.ArrayList;
import java.util.List;

/**
 * 快递柜实体类
 */
public class Cabinet {

    private List<CabinetPlat> cabinetPlats = new ArrayList<>();

    private String clientId;

    private String androidVersion;

    private String softwareVersion;

    private String softwareType;

    /**
     * 必填
     */
    private String imei;

    /**
     * 必填
     */
    private String sim;

    private String macIpv4;

    /**
     * unknown
     */
    private String macIpv6;


    private String wifiSSid;

    private String netType;

    private String platType;

    /**
     * 锁板信息
     */
    public static class CabinetPlat {
        /**
         * 锁板号
         */
        private int section;

        /**
         * 锁板类型
         */
        private String type;

        /**
         * 锁编号
         */
        private List<CabinetLocker> cabinetLockers;


        public int getSection() {
            return section;
        }

        public void setSection(int section) {
            this.section = section;
        }

        public String getType() {
            return type;
        }

        public void setType(String type) {
            this.type = type;
        }

        public List<CabinetLocker> getCabinetLockers() {
            return cabinetLockers;
        }

        public void setCabinetLockers(List<CabinetLocker> cabinetLockers) {
            this.cabinetLockers = cabinetLockers;
        }
    }

    /**
     * 锁信息
     */
    public static class CabinetLocker{

        private int section;

        private int port;

        /**
         * 锁是否开
         * true => 开
         * false => 关
         */
        @JsonAlias("unlocked")
        private String locked;

        public int getSection() {
            return section;
        }

        public void setSection(int section) {
            this.section = section;
        }

        public int getPort() {
            return port;
        }

        public void setPort(int port) {
            this.port = port;
        }

        public String getLocked() {
            return locked;
        }

        public void setLocked(String locked) {
            this.locked = locked;
        }
    }

    public List<CabinetPlat> getCabinetPlats() {
        return cabinetPlats;
    }

    public void setCabinetPlats(List<CabinetPlat> cabinetPlats) {
        this.cabinetPlats = cabinetPlats;
    }

    public String getClientId() {
        return clientId;
    }

    public void setClientId(String clientId) {
        this.clientId = clientId;
    }

    public String getAndroidVersion() {
        return androidVersion;
    }

    public void setAndroidVersion(String androidVersion) {
        this.androidVersion = androidVersion;
    }

    public String getSoftwareVersion() {
        return softwareVersion;
    }

    public void setSoftwareVersion(String softwareVersion) {
        this.softwareVersion = softwareVersion;
    }

    public String getSoftwareType() {
        return softwareType;
    }

    public void setSoftwareType(String softwareType) {
        this.softwareType = softwareType;
    }

    public String getImei() {
        return imei;
    }

    public void setImei(String imei) {
        this.imei = imei;
    }

    public String getSim() {
        return sim;
    }

    public void setSim(String sim) {
        this.sim = sim;
    }

    public String getMacIpv4() {
        return macIpv4;
    }

    public void setMacIpv4(String macIpv4) {
        this.macIpv4 = macIpv4;
    }

    public String getMacIpv6() {
        return macIpv6;
    }

    public void setMacIpv6(String macIpv6) {
        this.macIpv6 = macIpv6;
    }

    public String getWifiSSid() {
        return wifiSSid;
    }

    public void setWifiSSid(String wifiSSid) {
        this.wifiSSid = wifiSSid;
    }

    public String getNetType() {
        return netType;
    }

    public void setNetType(String netType) {
        this.netType = netType;
    }

    public String getPlatType() {
        return platType;
    }

    public void setPlatType(String platType) {
        this.platType = platType;
    }
}
