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

import cn.wise.sc.energy.power.plant.business.domain.vo.BtreeInfoVo;
import cn.wise.sc.energy.power.plant.business.domain.vo.EntityVo;
import lombok.Data;
import org.springframework.beans.BeanUtils;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Table;

/**
 * @description:
 * @author: qh
 * @create: 2020-09-03 10:00
 **/
@Data
@Entity
@Table(name = "btreeinfo")
public class BtreeInfo extends AbstractEntity<Long> {

    @Override
    public EntityVo toVo() {
        BtreeInfoVo entityVo = new BtreeInfoVo();
        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;

    /**
     * 二叉树诊断名称
     */
    @Column(name = "btreename")
    private String btreeName;

    /**
     * 0:正常，1:异常  2:其他
     */
    @Column(name = "result")
    private Integer result;

    /**
     * 诊断结论，json格式结论
     */
    @Lob
    @Column(name = "diagnosis")
    private String diagnosis;
}
