package com.jiayue.insu.incloud.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDateTime;


/**
 * 预测数据实体
 *
 * @author yh
 * @version 1.0
 * @since 2020/7/8 10:56
 */

@TableName(value = "in_forecast_data")
@Data
public class ForecastData {
    /**
     * Id
     */
    @TableId(type = IdType.AUTO)
    private Long id;


    private String stationCode;


    private String inCode;

    //下载时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime initTime;

    //上送时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime uploadTime;

    //修正时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime correctTime;

    //预测时间
    private Long forecastTime;
    /**
     * 预测功率（MW）
     */
    private BigDecimal fpValue;
    private BigDecimal fpValueCorrect;


    /**
     * 总辐射
     */
    private BigDecimal swr;
    private BigDecimal swrCorrect;


    /**
     * 直辐射
     */
    private BigDecimal directRadiation;
    private BigDecimal directRadiationCorrect;

    /**
     * 散辐射
     */
    private BigDecimal diffuseRadiation;
    private BigDecimal diffuseRadiationCorrect;


    //风速
    private BigDecimal windSpeed;
    private BigDecimal windSpeedCorrect;


    //风向
    private BigDecimal windDir;
    private BigDecimal windDirCorrect;


    //气温
    private BigDecimal temperature;
    private BigDecimal temperatureCorrect;


    //相对湿度
    private BigDecimal humidity;
    private BigDecimal humidityCorrect;


    //压力
    private BigDecimal pressure;
    private BigDecimal pressureCorrect;


    @TableField( exist = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Long startTime;

    @TableField( exist = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Long endTime;
}
