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

import cn.wise.sc.energy.power.plant.business.domain.eum.FunctionEnum;
import cn.wise.sc.energy.power.plant.business.domain.vo.EntityVo;
import cn.wise.sc.energy.power.plant.business.domain.vo.UnitInfoVo;
import lombok.Data;
import org.springframework.beans.BeanUtils;

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

/**
 * @description: 检测方式信息
 * @author: qh
 * @create: 2020-07-14 09:42
 **/
@Data
@Entity
@Table(name = "unitinfo")
public class UnitInfo extends AbstractEntity<String>{

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

    /**
     * 监测单元唯一标识编码如：C0A0010101，该标识用于与监测特征(测点)配置信息表、运行时配置信息表的关联
     */
    @Id
    @Column(name = "unitcodeid")
    private String unitCodeId;
    /**
     * 监测单元所在电站的标识
     */
    @Column(name = "plantid")
    private String plantId;
    /**
     * 监测单元所属设备的标识
     */
    @Column(name = "deviceid")
    private String deviceId;
    /**
     * 监测单元名称
     */
    @Column(name = "unitname")
    private String unitName;
    /**
     * 设备索引号(保留)
     */
    @Column(name = "machineid")
    private String machineId;
    /**
     * 监测单元索引号(保留)
     */
    @Column(name = "unitid")
    private String unitId;
    /**
     * 监测单元传输网络代码(保留
     */
    @Column(name = "unitnetcode")
    private String unitNetCode;
    /**
     * 监测单元指出的功能
     * TrendAnalys|BinaryTreeAnalys|RadarMonitor
     * TrendAnalys: 支持趋势分析
     * VibrationAnalys: 支持波形频谱分析
     * BinaryTreeAnalys: 支持二叉树分析诊断（作废）
     * RadarMonitor: 支持雷达图监测（作废）
     */
    private String function;
    /**
     * 监测单元静态参数描述
     */
    @Column(name = "unitparam")
    private String unitParam;

    @Override
    public String getId() {
        return getUnitId();
    }
}
