Newer
Older
huludao / src / main / java / com / newfiber / api / pc / model / gaofen / OneByOneHour.java
package com.newfiber.api.pc.model.gaofen;

import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 高分天气 逐小时预报的实体类。 刷新时间 每小时一次
 * @ClassName OneByOneHour
 * @Description TODO
 * @Author 张鸿志
 * @Date 2021年8月18日20:03:35 20:03
 * Version 1.0
 **/
@Data
@ApiModel
public class OneByOneHour implements Serializable {

    @ApiModelProperty("天气现象")
    private String text;
    @ApiModelProperty("天气现象编码")
    private String code;
    @ApiModelProperty("气温,单位℃")
    private Integer tempFc;
    @ApiModelProperty("风级")
    private String windClass;
    @ApiModelProperty("风速,单位m/s")
    private BigDecimal windSpeed;
    @ApiModelProperty("风向描述")
    private String windDir;
    @ApiModelProperty("风向角度,0表示正北风,180表示正南风")
    private Integer windAngle;
    @ApiModelProperty("相对湿度,单位%")
    private Integer rh;
    @ApiModelProperty("降水量,单位毫米(mm)")
    private BigDecimal prec;
    @ApiModelProperty("气压,单位百帕(hPa)")
    private Integer pressure;
    @ApiModelProperty("云量,单位%")
    private Integer clouds;
    @ApiModelProperty("体感温度,单位℃")
    private Integer feelsLike;
    @ApiModelProperty("预报时次(当地时间)")
    private String dataTime;


    public OneByOneHour(){

    }

    public OneByOneHour(JSONObject jsonObject){
        this.text = (String) jsonObject.get("text");
        this.code = (String) jsonObject.get("code");
        this.tempFc = (Integer) jsonObject.get("temp_fc");
        this.windClass = (String) jsonObject.get("wind_class");
        this.windSpeed = (BigDecimal) jsonObject.get("wind_speed");
        this.windDir = (String) jsonObject.get("wind_dir");
        this.windAngle = (Integer) jsonObject.get("wind_angle");
        this.rh = (Integer) jsonObject.get("rh");
        this.prec = (BigDecimal) jsonObject.get("prec");
        this.pressure = (Integer) jsonObject.get("pressure");
        this.clouds = (Integer) jsonObject.get("clouds");
        this.feelsLike = (Integer) jsonObject.get("feels_like");
        this.dataTime = (String) jsonObject.get("data_time");
    }


}