You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
admin-client-temperature/src/main/java/com/rehome/mqttclienttemperature/entity/WebServiceWeatherInfo.java

152 lines
5.4 KiB
Java

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package com.rehome.mqttclienttemperature.entity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.Proxy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import javax.persistence.*;
import java.util.Date;
/**
* 调用方法如下输入参数theCityName = 城市中文名称(国外城市可用英文)或城市代码(不输入默认为上海市)
* 如:上海 或 58367如有城市名称重复请使用城市代码查询(可通过 getSupportCity 或 getSupportDataSet 获得)
* 返回数据: 一个一维数组 String(22)共有23个元素。
* String(0) 到 String(4):省份,城市,城市代码,城市图片名称,最后更新时间。
* String(5) 到 String(11):当天的 气温,概况,风向和风力,天气趋势开始图片名称(以下称:图标一)
* 天气趋势结束图片名称(以下称:图标二),现在的天气实况,天气和生活指数。
* String(12) 到 String(16):第二天的 气温,概况,风向和风力,图标一,图标二。
* String(17) 到 String(21):第三天的 气温,概况,风向和风力,图标一,图标二。
* String(22) 被查询的城市或地区的介绍
*/
@EntityListeners(AuditingEntityListener.class)
@Proxy(lazy = false)
@Data
@Entity
//@Table(indexes = {@Index(name = "idx_cityName", columnList = "cityName"), @Index(name = "idx_cityCode", columnList = "cityCode"), @Index(name = "idx_createDate", columnList = "createDate"), @Index(name = "idx_dataHour", columnList = "dataHour"), @Index(name = "idx_dataMinute", columnList = "dataMinute"), @Index(name = "idx_dataSecond", columnList = "dataSecond"),
// @Index(name = "data_create_date_city_code", columnList = "cityCode"), @Index(name = "data_create_date_city_code", columnList = "createDate"),
// @Index(name = "data_create_date_city_name", columnList = "cityName"), @Index(name = "data_create_date_city_name", columnList = "createDate")})
public class WebServiceWeatherInfo {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@ApiModelProperty(value = "主键")
private Long id;
@Column(length = 100)
@ApiModelProperty(value = "洲、国内外省份名称")
private String provinceName;
@Column(length = 100)
@ApiModelProperty(value = "国内外城市中文名称")
private String cityName;
@Column(length = 30)
@ApiModelProperty(value = "城市编号")
private String cityCode;
@Column(length = 30)
@ApiModelProperty(value = "城市图片名称")
private String cityPhoto;
@Column(length = 30)
@ApiModelProperty(value = "天气最后更新时间")
private String weatherLastUpdate;
@Column(length = 20)
@ApiModelProperty(value = "当天的 气温")
private String weatherNow;
@ApiModelProperty(value = "概况")
private String weatherShortDesc;
@Column(length = 30)
@ApiModelProperty(value = "风向和风力")
private String windDesc;
@Column(length = 30)
@ApiModelProperty(value = "天气趋势开始图片名称(以下称:图标一)")
private String weatherTrendStart;
@Column(length = 30)
@ApiModelProperty(value = "天气趋势结束图片名称(以下称:图标二)")
private String weatherTrendEnd;
//存放长文本
@Lob
@Basic(fetch = FetchType.LAZY)
@ApiModelProperty(value = "现在的天气实况")
private String weatherRealStatus;
//存放长文本
@Lob
@Basic(fetch = FetchType.LAZY)
@ApiModelProperty(value = "天气和生活指数")
private String weatherLiveIndex;
@Column(length = 20)
@ApiModelProperty(value = "第二天的 气温")
private String nextDateTemperature;
@Column(length = 30)
@ApiModelProperty(value = "第二天的 概况")
private String nextDateWeatherShortDesc;
@Column(length = 30)
@ApiModelProperty(value = "第二天的 风向和风力")
private String nextDateWindDesc;
@Column(length = 30)
@ApiModelProperty(value = "第二天的 图标一")
private String nextDateWeatherTrendStart;
@Column(length = 30)
@ApiModelProperty(value = "第二天的 图标二")
private String nextDateWeatherTrendEnd;
@Column(length = 20)
@ApiModelProperty(value = "第三天的 气温")
private String threeDayTemperature;
@Column(length = 30)
@ApiModelProperty(value = "第三天的 概况")
private String threeWeatherShortDesc;
@Column(length = 30)
@ApiModelProperty(value = "第三天的 风向和风力")
private String threeDayWindDesc;
@Column(length = 30)
@ApiModelProperty(value = "第三天的 图标一")
private String threeDayWeatherTrendStart;
@Column(length = 30)
@ApiModelProperty(value = "第三天的 图标二")
private String threeDayWeatherTrendEnd;
@ApiModelProperty(value = "被查询的城市或地区的介绍")
//存放长文本
@Lob
@Basic(fetch = FetchType.LAZY)
private String cityIntroduce;
@ApiModelProperty(value = "日期")
@Temporal(TemporalType.TIMESTAMP)
@CreatedDate
private Date createDate;
@ApiModelProperty(value = "时")
@Column(length = 20)
private String dataHour;
@ApiModelProperty(value = "分")
@Column(length = 20)
private String dataMinute;
@ApiModelProperty(value = "秒")
@Column(length = 20)
private String dataSecond;
}