package com.gyee.wisdom.dao.sql.control.entity;

import com.gyee.wisdom.common.data.ToData;
import com.gyee.wisdom.common.data.control.GycpCmdInfo;
import com.gyee.wisdom.common.data.control.InputOrOutputSpeedTotal;
import com.gyee.wisdom.dao.sql.ModelConstants;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * @descrition:
 * @author:Wanghs
 * @date:2019-09-10
 */
@Data
@NoArgsConstructor
@ToString
@EqualsAndHashCode()
@Entity
@Table(name = ModelConstants.INPUT_OR_OUTPUT_SPEED_TOTAL)
public class InputOrOutputSpeedTotalEntity implements ToData<InputOrOutputSpeedTotal> {

    @Id
    @Column(name = ModelConstants.ID_)
    private int id;
    //风机编号
    @Column(name = ModelConstants.WINDTURBINEID)
    private String windturbineId;
    //风机最小切入风
    @Column(name = ModelConstants.INPUT_SMALL)
    private double inputSmall;

    @Column(name = ModelConstants.RECORDE_DATE)
    private Date recordDate;

    @Override
    public InputOrOutputSpeedTotal toData() {
        InputOrOutputSpeedTotal data = new InputOrOutputSpeedTotal();
        data.setId(this.getId());
        data.setWindturbineId(this.getWindturbineId());
        data.setInputSmall(this.getInputSmall());
        data.setRecordDate(this .getRecordDate());
        return data;
    }
}
