Newer
Older
newfiber-termite / newfiber-termites / newfiber-termites-dataup / src / main / java / com / newfiber / termite / domain / OneByOneNow.java
@yanghui yanghui on 20 May 1 KB 白蚁代码提交
package com.newfiber.termite.domain;

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;
@Data
@ApiModel
public class OneByOneNow implements Serializable {

    @ApiModelProperty("天气现象")
    private String text;

    @ApiModelProperty("天气现象编码")
    private String code;

    @ApiModelProperty("气温,单位℃")
    private BigDecimal temp;
    @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;



    public OneByOneNow(){

    }

    public OneByOneNow(JSONObject jsonObject){
        this.text = (String) jsonObject.get("text");
        this.code = (String) jsonObject.get("code");
        this.temp = (BigDecimal) jsonObject.get("temp");
        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");
    }


}