package com.aucma.base.domain;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.aucma.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.aucma.common.annotation.Excel;

/**
 * 计量设备信息对象 base_monitorinfo
 *
 * @author Yinq
 * @date 2023-09-21
 */
public class BaseMonitorInfo extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键标识
     */
    private Long objId;

    /**
     * 计量设备编号
     */
    private String monitorCode;

    /**
     * 计量设备名称
     */
    @Excel(name = "计量设备名称")
    private String monitorName;

    /**
     * 计量设备位置
     */
    @Excel(name = "计量设备位置")
    private String monitorAddress;

    /**
     * 计量设备类型（1-电）
     */
    @Excel(name = "计量设备类型", readConverterExp = "1=-电")
    private Long monitorType;

    /**
     * 计量设备状态（1-启用；2-停用；3-异常）
     */
    @Excel(name = "计量设备状态", readConverterExp = "1=-启用；2-停用；3-异常")
    private Long monitorStatus;

    /**
     * PT值
     */
    @Excel(name = "PT值")
    private Long pt;

    /**
     * CT值
     */
    @Excel(name = "CT值")
    private Long ct;

    /**
     * 表具层级
     */
    @Excel(name = "表具层级")
    private Long monitorHierarchy;

    /**
     * 网络地址
     */
    @Excel(name = "网络地址")
    private String monitorNetwork;

    /**
     * 启用标识
     */
    @Excel(name = "启用标识")
    private Long isFlag;

    /**
     * 创建人
     */
    @Excel(name = "创建人")
    private String createdBy;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createdTime;

    /**
     * 更新人
     */
    @Excel(name = "更新人")
    private String updatedBy;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date updatedTime;

    /**
     * 是否虚拟设备（0-是；1-否）
     */
    @Excel(name = "是否虚拟设备", readConverterExp = "0=-是；1-否")
    private Long isAmmeter;

    private List<BaseMonitorInfo> children = new ArrayList<BaseMonitorInfo>();

    private String parentName;

    private Long parentId;

    private Integer orderNum;

    private String ancestors;

    public List<BaseMonitorInfo> getChildren() {
        return children;
    }

    public void setChildren(List<BaseMonitorInfo> children) {
        this.children = children;
    }

    public String getParentName() {
        return parentName;
    }

    public void setParentName(String parentName) {
        this.parentName = parentName;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public Integer getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(Integer orderNum) {
        this.orderNum = orderNum;
    }

    public String getAncestors() {
        return ancestors;
    }

    public void setAncestors(String ancestors) {
        this.ancestors = ancestors;
    }

    public void setObjId(Long objId) {
        this.objId = objId;
    }

    public Long getObjId() {
        return objId;
    }

    public void setMonitorCode(String monitorCode) {
        this.monitorCode = monitorCode;
    }

    public String getMonitorCode() {
        return monitorCode;
    }

    public void setMonitorName(String monitorName) {
        this.monitorName = monitorName;
    }

    public String getMonitorName() {
        return monitorName;
    }

    public void setMonitorAddress(String monitorAddress) {
        this.monitorAddress = monitorAddress;
    }

    public String getMonitorAddress() {
        return monitorAddress;
    }

    public void setMonitorType(Long monitorType) {
        this.monitorType = monitorType;
    }

    public Long getMonitorType() {
        return monitorType;
    }

    public void setMonitorStatus(Long monitorStatus) {
        this.monitorStatus = monitorStatus;
    }

    public Long getMonitorStatus() {
        return monitorStatus;
    }

    public void setPt(Long pt) {
        this.pt = pt;
    }

    public Long getPt() {
        return pt;
    }

    public void setCt(Long ct) {
        this.ct = ct;
    }

    public Long getCt() {
        return ct;
    }

    public void setMonitorHierarchy(Long monitorHierarchy) {
        this.monitorHierarchy = monitorHierarchy;
    }

    public Long getMonitorHierarchy() {
        return monitorHierarchy;
    }

    public void setMonitorNetwork(String monitorNetwork) {
        this.monitorNetwork = monitorNetwork;
    }

    public String getMonitorNetwork() {
        return monitorNetwork;
    }

    public void setIsFlag(Long isFlag) {
        this.isFlag = isFlag;
    }

    public Long getIsFlag() {
        return isFlag;
    }

    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    public String getCreatedBy() {
        return createdBy;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setUpdatedBy(String updatedBy) {
        this.updatedBy = updatedBy;
    }

    public String getUpdatedBy() {
        return updatedBy;
    }

    public void setUpdatedTime(Date updatedTime) {
        this.updatedTime = updatedTime;
    }

    public Date getUpdatedTime() {
        return updatedTime;
    }

    public void setIsAmmeter(Long isAmmeter) {
        this.isAmmeter = isAmmeter;
    }

    public Long getIsAmmeter() {
        return isAmmeter;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("objId", getObjId())
                .append("parentId", getParentId())
                .append("ancestors", getAncestors())
                .append("monitorCode", getMonitorCode())
                .append("monitorName", getMonitorName())
                .append("monitorAddress", getMonitorAddress())
                .append("monitorType", getMonitorType())
                .append("monitorStatus", getMonitorStatus())
                .append("pt", getPt())
                .append("ct", getCt())
                .append("monitorHierarchy", getMonitorHierarchy())
                .append("monitorNetwork", getMonitorNetwork())
                .append("isFlag", getIsFlag())
                .append("createdBy", getCreatedBy())
                .append("createdTime", getCreatedTime())
                .append("updatedBy", getUpdatedBy())
                .append("updatedTime", getUpdatedTime())
                .append("isAmmeter", getIsAmmeter())
                .append("children", getChildren())
                .toString();
    }
}
