package com.sikey.wa04.business.infrastructure.dto.response.child;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class GetChildResponse implements Serializable {
    @Serial
    private static final long serialVersionUID = 6478501883822819651L;

    private List<GetChild> childList;

    @Data
    @Accessors(chain = true)
    public static class GetChildDevice {
        private Long did;
        /**
         * @see com.sikey.wa04.common.enums.VideoCallChannel
         */
        private Integer videoCallChannel;
        private Integer battery;
        private Integer signal;
        private Integer maxSignal;
        private String ticket;
        private Boolean startup;
        private String model;
        private String version;
    }

    @Data
    @Accessors(chain = true)
    public static class GetChildLocation {
        private String latitude;
        private String longitude;
        /**
         * 时间戳
         */
        private String positionTime;
        private Integer radius;
        /**
         * @see com.sikey.wa04.common.enums.LocationType
         */
        private Integer pointType;
    }

    @Data
    @Accessors(chain = true)
    public static class GetWeather {
        /**
         * 城市ID
         */
        private String cityId;
        /**
         * 自定义气象Code
         */
        private String myTextCode;
        /**
         * 原始气象Code
         */
        private String textCode;
        /**
         * 最高温
         */
        private Integer high;
        /**
         *  最低温
         */
        private Integer low;
        /**
         * 当前温度
         */
        private Integer now;
    }

    @Data
    @Accessors(chain = true)
    public static class GetChild {
        private String cid;
        private Integer stepCount;
        private String name;
        private String avatar;
        private String areaCode;
        private String phoneNumber;
        private String appellation;
        private String birthday;
        private Integer gender;
        private Integer weight;
        private Integer height;
        private Integer role;
        private GetChildDevice device;
        private GetChildLocation lastLocation;
        private GetWeather weather;
    }
}
