package com.ruoyi.ucp.entity;

import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author gfhd
 * @since 2024-10-21
 */
@TableName("realtime_predict")
public class RealtimePredict implements Serializable {

    private static final long serialVersionUID = 1L;

    private String id;

    private String modelId;

    private String predictType;

    private String deviceType;

    private Date time;

    private String siteId;

    private String periodId;

    private String lineId;

    private String turbineId;

    private Double predictPower;

    private Double predictEnergy;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getModelId() {
        return modelId;
    }

    public void setModelId(String modelId) {
        this.modelId = modelId;
    }

    public String getPredictType() {
        return predictType;
    }

    public void setPredictType(String predictType) {
        this.predictType = predictType;
    }

    public String getDeviceType() {
        return deviceType;
    }

    public void setDeviceType(String deviceType) {
        this.deviceType = deviceType;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public String getSiteId() {
        return siteId;
    }

    public void setSiteId(String siteId) {
        this.siteId = siteId;
    }

    public String getPeriodId() {
        return periodId;
    }

    public void setPeriodId(String periodId) {
        this.periodId = periodId;
    }

    public String getLineId() {
        return lineId;
    }

    public void setLineId(String lineId) {
        this.lineId = lineId;
    }

    public String getTurbineId() {
        return turbineId;
    }

    public void setTurbineId(String turbineId) {
        this.turbineId = turbineId;
    }

    public Double getPredictPower() {
        return predictPower;
    }

    public void setPredictPower(Double predictPower) {
        if (predictPower == null || predictPower < 0) predictPower = 0.0;
        this.predictPower = predictPower;
    }

    public Double getPredictEnergy() {
        return predictEnergy;
    }

    public void setPredictEnergy(Double predictEnergy) {
        if (predictEnergy == null || predictEnergy < 0) predictEnergy = 0.0;
        this.predictEnergy = predictEnergy;
    }

    @Override
    public String toString() {
        return "RealtimePredict{" +
                "id = " + id +
                ", modelId = " + modelId +
                ", predictType = " + predictType +
                ", deviceType = " + deviceType +
                ", time = " + time +
                ", siteId = " + siteId +
                ", periodId = " + periodId +
                ", lineId = " + lineId +
                ", turbineId = " + turbineId +
                ", predictPower = " + predictPower +
                ", predictEnergy = " + predictEnergy +
                "}";
    }
}
