package com.persagy.proxy.object.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.persagy.proxy.adm.annotations.CascadeColumn;
import com.persagy.proxy.adm.model.AdmBaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * ADM 系统实体
 * @author lvxy
 * @date 2021/8/17
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class AdmSystem extends AdmBaseEntity<AdmSystem> {
    public static final String OBJ_TYPE = "system";
    /** 名称 */
    private String name;
    /** 本地编码 */
    private String localId;
    /** 本地名称 */
    private String localName;
    /** 设计图纸中编码 */
    private String cadId;
    /** 系统分类 */
    private String classCode;
    /** 设计图纸中编码 */
    @JsonProperty("cADID")
    private String cADID;

    /** BIM模型中编码 */
    private String bimId;

    /** 项目ID */
    private String projectId;
    /** 建筑ID */
    private String buildingId;
    /** 楼层ID */
    private String floorId;
    /** 设备数量 */
    private Long count = 0L;
    /** 设备分类名 */
    private String categoryName;
    /** 设备分类名 */
    private AdmSystemCategory categoryNames;

    /** 对象类型 */
    private String objectType = OBJ_TYPE;

    /** 级联-设备 */
    @CascadeColumn(graphCode = "MechSubset", relCode = "Sy2Eq")
    private List<AdmEquipment> equipmentList;

    /** 级联-竖井*/
    @CascadeColumn(graphCode = "MechInArch", relCode = "Sy2Sh")
    private List<AdmShaft> shaftList;

    /** 级联-空间 */
    @CascadeColumn(graphCode = "MechInArch", relCode = "Sy2Sp")
    private List<AdmSpace> zoneSpaceBaseTableList;
    /** 级联-楼层 */
    @CascadeColumn(graphCode = "MechInArch", relCode = "Sy2Fl")
    private List<AdmFloor> floorList;
    /** 级联-建筑 */
    @CascadeColumn(graphCode = "MechInArch", relCode = "Sy2Bd")
    private List<AdmBuilding> buildingList;
    /** 建筑楼层 */
    private List<ObjectNode> buildingFloorInfoList;

    /** 供展示使用，并非实体中的字段 **/
    /** 设备id*/
    private String equipId;
    /** 设备名称*/
    private String equipName;
    /** 设备本地名称*/
    private String equipLocalName;
}
