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

import com.gyee.wisdom.common.data.ToData;
import com.gyee.wisdom.common.data.photovoltaic.Inverter;
import com.gyee.wisdom.common.data.windturbine.Windturbine;
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:WXW
 * @date:2020-04-28
 */
@Data
@NoArgsConstructor
@ToString
@EqualsAndHashCode()
@Entity
@Table(name = "WINDTURBINE")
public class InverterEntity implements ToData<Inverter> {
    /** 主键ID */
    @Id
    @Column(name = "ID")
    private String id;
    /** 场站id */
    @Column(name = "WINDPOWERSTATIONID")
    private String station;
    /** 机型 */
    @Column(name = "MODELID")
    private String model;
    /** 项目id */
    @Column(name = "PROJECTID")
    private String project;
    /** 线路id */
    @Column(name = "LINEID")
    private String line;
//    /** 风机描述 */
//    @Column(name = "NAME")
//    private String name;

    @Override
    public Inverter toData()
    {
        Inverter inverter=null;
        if(this!=null)
        {
            inverter=new Inverter();
            inverter.setId(this.getId());
            inverter.setStation(this.getStation());
            inverter.setProject(this.getProject());
            inverter.setLine(this.getLine());
            inverter.setModel(this.getModel());
            //inverter.setName(this.getName());
        }
        return inverter;
    }


}
