package com.inspect.metadata.area.domain;

import com.inspect.base.core.annotation.Excel;
import com.inspect.base.core.web.domain.BaseEntity;

import java.util.ArrayList;
import java.util.List;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;

@Setter
public class BaseDataArea extends BaseEntity {
    private static final long serialVersionUID = 1L;
    private Long areaId;
    @Excel(
            name = "区域名称"
    )
    private String areaName;
    @Excel(
            name = "区域路径（根节点/一级/二级/N级）"
    )
    private String areaAddr;
    @Excel(
            name = "区域编码"
    )
    private String areaCode;
    @Excel(
            name = "区域描述"
    )
    private String remark;
    @Excel(
            name = "生产区域类型"
    )
    private String areaType;
    @Excel(
            name = "生产区域类型编码"
    )
    private String deviceTypeCode;
    private Long parentId;
    private Long relationParentId ;
    private String ancestors;
    private String relationAncestors;
    private String orderNum;
    private String status;
    private String delFlag;
    private String parentName;
    private String areaIdS;
    private String oldAreaId;
    private String oldParentId;
    private List<BaseDataArea> children = new ArrayList<>();
    private List<String> filterNameList;

    // 设备类型 编码 10: 摄像头（高清视频）  13：无人机 0：机器人
    private List<String> devTypeList;

    // 设备类型 字典编码
    private List<Long> devTypeCodeList;


    // 算法类型 编码 1: 表计 2：外观 3：红外
    private List<String> algTypeList;

    // 算法类型 字典编码
    private List<Long> algTypeCodeList;

    // 是否过滤未配置预置位的点位
    private Boolean filterByPreset;

    public Boolean getFilterByPreset() {
        return filterByPreset;
    }

    public void setFilterByPreset(Boolean filterByPreset) {
        this.filterByPreset = filterByPreset;
    }
    public String getOldAreaId() {
        return this.oldAreaId;
    }

    public String getOldParentId() {
        return this.oldParentId;
    }

    public Long getAreaId() {
        return this.areaId;
    }

    public Long getParentId() {
        return this.parentId;
    }

    public String getAncestors() {
        return this.ancestors;
    }

    public Long getRelationParentId() {
        return relationParentId;
    }

    public void setRelationParentId(Long relationParentId) {
        this.relationParentId = relationParentId;
    }

    public String getRelationAncestors() {
        return relationAncestors;
    }

    public void setRelationAncestors(String relationAncestors) {
        this.relationAncestors = relationAncestors;
    }

    @NotBlank(
            message = "部门名称不能为空"
    )
    @Size(
            min = 0,
            max = 30,
            message = "部门名称长度不能超过30个字符"
    )
    public String getAreaName() {
        return this.areaName;
    }

    @NotBlank(
            message = "显示顺序不能为空"
    )
    public String getOrderNum() {
        return this.orderNum;
    }

    public String getAreaType() {
        return this.areaType;
    }

    public String getStatus() {
        return this.status;
    }

    public String getDelFlag() {
        return this.delFlag;
    }

    public String getParentName() {
        return this.parentName;
    }

    public List<BaseDataArea> getChildren() {
        return this.children;
    }

    public String getAreaAddr() {
        return this.areaAddr;
    }

    public String getAreaCode() {
        return this.areaCode;
    }

    public String getRemark() {
        return this.remark;
    }

    public String getDeviceTypeCode() {
        return this.deviceTypeCode;
    }

    public String getAreaIdS() {
        return this.areaIdS;
    }

    public List<String> getFilterNameList() {
        return filterNameList;
    }

    public void setFilterNameList(List<String> filterNameList) {
        this.filterNameList = filterNameList;
    }

    public List<String> getDevTypeList() {
        return devTypeList;
    }

    public void setDevTypeList(List<String> devTypeList) {
        this.devTypeList = devTypeList;
    }

    public List<String> getAlgTypeList() {
        return algTypeList;
    }

    public void setAlgTypeList(List<String> algTypeList) {
        this.algTypeList = algTypeList;
    }

    public List<Long> getDevTypeCodeList() {
        return devTypeCodeList;
    }

    public void setDevTypeCodeList(List<Long> devTypeCodeList) {
        this.devTypeCodeList = devTypeCodeList;
    }

    public List<Long> getAlgTypeCodeList() {
        return algTypeCodeList;
    }

    public void setAlgTypeCodeList(List<Long> algTypeCodeList) {
        this.algTypeCodeList = algTypeCodeList;
    }

    @Override
    public String toString() {
        return "BaseDataArea{" +
                "areaId=" + areaId +
                ", areaName='" + areaName + '\'' +
                ", areaAddr='" + areaAddr + '\'' +
                ", areaCode='" + areaCode + '\'' +
                ", remark='" + remark + '\'' +
                ", areaType='" + areaType + '\'' +
                ", deviceTypeCode='" + deviceTypeCode + '\'' +
                ", parentId=" + parentId +
                ", relationParentId=" + relationParentId +
                ", ancestors='" + ancestors + '\'' +
                ", relationAncestors='" + relationAncestors + '\'' +
                ", orderNum='" + orderNum + '\'' +
                ", status='" + status + '\'' +
                ", delFlag='" + delFlag + '\'' +
                ", parentName='" + parentName + '\'' +
                ", areaIdS='" + areaIdS + '\'' +
                ", oldAreaId='" + oldAreaId + '\'' +
                ", oldParentId='" + oldParentId + '\'' +
                ", filterNameList='" + filterNameList + '\'' +
                ", children=" + children +
                '}';
    }
}
