package com.jiayue.ipfcst.common.data.abst;

import com.jiayue.ipfcst.common.data.constant.enums.PredictionModelEnum;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.core.annotation.Order;
import org.springframework.data.annotation.CreatedDate;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 预测功率抽象实体
 *
 * @author zzy
 * @version 1.0
 * @since 2018/11/2 12:23
 */
@Data
@MappedSuperclass
public class AbstractForecastPowerBase implements Serializable {

    private static final long serialVersionUID = 1L;


    @Id
    @Order(1)
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "myid")
    @GenericGenerator(name = "myid", strategy = "com.jiayue.ipfcst.common.data.entity.id.CustomIDGenerator")
    private Integer id;

    /**
     * 生成日期
     */
    @Order(100)
    @Temporal(TemporalType.TIMESTAMP)
    @CreatedDate
    @Column
    private Date genDate;

    /**
     * 预测时间
     */
    @Order(101)
    @Column
    private Long forecastTime;

    /**
     * 预测模型
     */
    @Order(102)
    @Column
    @Enumerated(EnumType.STRING)
    private PredictionModelEnum predictionModelEnum;

    /**
     * 场站编号
     */
    @Column
    private String stationCode;
}
