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

import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;

@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ToString
public class IotResponse implements Serializable {
    @Serial
    private static final long serialVersionUID = -7804665169016316618L;

    private String address;
    private String city;
    private String cityId;

    /**
     * 天气
     */
    private Weather weather;

    @Data
    @Accessors(chain = true)
    @EqualsAndHashCode(callSuper = false)
    @ToString
    public static final class Weather {

        /**
         * 最高气温
         */
        private Integer high;

        /**
         * 最低气温
         */
        private Integer low;

        /**
         * 当前气温
         */
        private Integer now;

        /**
         * 自定义气象Code
         */
        private String myTextCode;

        /**
         * 天气code
         */
        private String code;

        /**
         * 天气文字
         */
        private String text;

    }
}
