package cn.wise.sc.energy.power.plant.business.domain;

import cn.wise.sc.energy.power.plant.business.domain.vo.AlertInfoVo;
import cn.wise.sc.energy.power.plant.business.domain.vo.EntityVo;
import cn.wise.sc.energy.power.plant.business.domain.vo.EventInfoVo;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @description: 预警值更新记录表
 * @author: qh
 * @create: 2020-09-03 09:52
 **/
@Data
@Entity
@Table(name = "altinfo")
public class AlertInfo extends AbstractEntity<Long> {

    @Override
    public EntityVo toVo() {
        AlertInfoVo entityVo = new AlertInfoVo();
        BeanUtils.copyProperties(this, entityVo);
        return entityVo;
    }

    @Id
    private Long id;

    /**
     * 监测特征所属电站的标识
     */
    @Column(name = "plantid")
    private String plantId;

    /**
     * 监测特征所属设备的标识
     */
    @Column(name = "deviceid")
    private String deviceId;

    /**
     * 监测特征所属监测单元标识
     */
    @Column(name = "unitcodeid")
    private String unitCodeId;

    /**
     * 监测特征唯一标识编码(KKS编码
     */
    @Column(name = "kkscode")
    private String kKSCode;

    /**
     * 预警值
     */
    @Column(name = "value")
    private Float value;

    /**
     * 预警值
     */
    @Column(name = "newvalue")
    private Float newValue;

    /**
     * 记录更新时间
     */
    @Column(name = "valuetime")
    private Long valuetime;

    /**
     * 设置来源(角色或后台)
     */
    @Column(name = "usr")
    private String usr;

}
