package com.gyee.wisdom.dao.sql.alarm.Entity;

import com.gyee.wisdom.common.data.ToData;
import com.gyee.wisdom.common.data.alarm.ElectricalTestingPointDI;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;


@Data
@Entity
@NoArgsConstructor
@Table(name = "electricaltestingpointdi")
public class ElectricalTestingPointDIEntity implements ToData<ElectricalTestingPointDI>, Serializable {
    @Id
    @Column(name = "id")
    private String id;
    @Column(name = "code")
    private String code;
    @Column(name = "name")
    private String name;
    @Column(name = "model")
    private String model;
    @Column(name = "valueunit")
    private String valueUnit;
    @Column(name = "englishname")
    private String englishName;
    @Column(name = "typeid")
    private String typeId;
    @Column(name = "modelid")
    private String modelId;
    @Column(name = "maxval")
    private String maxVal;
    @Column(name = "minval")
    private String minVal;
    @Column(name = "reasonablemaxval")
    private String reasonablemaxval;
    @Column(name = "reasonableminval")
    private String reasonableminval;
    @Column(name = "electricalid")
    private String electricalId;
    @Column(name = "uniformcode")
    private String uniformCode;
    @Column(name = "shortid")
    private String shortId;
    @Column(name = "longid")
    private String longId;
    @Column(name = "windpowerstationid")
    private String windPowerStationId;
    @Column(name = "realtimeid")
    private String realtimeId;

    @Override
    public ElectricalTestingPointDI toData() {
        ElectricalTestingPointDI electricalTestingPointDI = new ElectricalTestingPointDI();
        BeanUtils.copyProperties(this, electricalTestingPointDI);
        return electricalTestingPointDI;
    }

}
