package com.example.iot_controlhost.model;

import androidx.annotation.NonNull;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;

import java.util.Date;

@Entity
public class EnergyRecord {
    /**
     * 唯一Id
     */
    @Id(autoincrement = true)
    private Long id;
    /**
     * 能耗值
     */
    @NonNull
    Double energy;
    /**
     * 记录时间
     */
    @NonNull
    Date datetime;
    @Generated(hash = 1248913969)
    public EnergyRecord(Long id, @NonNull Double energy, @NonNull Date datetime) {
        this.id = id;
        this.energy = energy;
        this.datetime = datetime;
    }
    @Generated(hash = 496893221)
    public EnergyRecord() {
    }
    public Long getId() {
        return this.id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public Double getEnergy() {
        return this.energy;
    }
    public void setEnergy(Double energy) {
        this.energy = energy;
    }
    public Date getDatetime() {
        return this.datetime;
    }
    public void setDatetime(Date datetime) {
        this.datetime = datetime;
    }
   

}
