package com.bcrjl.miwifi.model.result;

import cn.hutool.core.annotation.Alias;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

import java.util.List;

/**
 * @author yanqs
 */
@Data
public class StatusResult {
    private List<Dev> dev;

    @JsonIgnore
    private int code;

    private Mem mem;

    private int temperature;

    private Count count;

    private Hardware hardware;

    private String upTime;

    private Cpu cpu;

    private Wan wan;

    @Data
    public class Count {
        @Alias("all_without_mash")
        private int allWithoutMash;

        private int online;

        private int all;

        @Alias("online_without_mash")
        private int online_without_mash;
    }

    @Data
    public class Mem {
        private double usage;

        private String total;

        private String hz;

        private String type;
    }

    @Data
    public class Dev {
        private String mac;
        @Alias("isap")
        private int isAp;
        private String upload;
        @Alias("upspeed")
        private String upSpeed;
        @Alias("downspeed")
        private String downSpeed;
        private String online;
        @Alias("devname")
        private String devName;
        @Alias("maxuploadspeed")
        private String maxUploadSpeed;
        @Alias("maxdownloadspeed")
        private String maxDownloadSpeed;
        private String download;
    }

    @Data
    public class Wan {
        @Alias("downspeed")
        private String downSpeed;
        @Alias("maxdownloadspeed")
        private String maxDownloadSpeed;
        @Alias("devname")
        private String devName;

        private String upload;
        @Alias("upspeed")
        private String upSpeed;
        @Alias("maxuploadspeed")
        private String maxUploadSpeed;

        private String download;
    }

    @Data
    public class Cpu {
        private int core;

        private String hz;

        private int load;
    }

    @Data
    public class Hardware {
        private String mac;

        private String platform;

        private String version;

        private String channel;

        private String sn;
    }
}
