package com.persagy.proxy.object.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.databind.node.ArrayNode;
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 AdmShaft extends AdmBaseEntity<AdmShaft> {
    public static final String OBJ_TYPE = "shaft";
    /** 竖井名称 */
    private String name;
    /** 竖井本地编码 */
    private String localId;
    /** 竖井本地名称 */
    private String localName;
    /** BIM模型中编码 */
    private String bimId;
    /** 设计图纸中编码 */
    @JSONField(name = "cADID")
    private String cadId;
    /** 二维码图片 */
    private String qRCodePic;
    /** 二维码内容 */
    private String defaultQRCode;
    /** 项目id */
    private String projectId;
    /** BIM模型中坐标 */
    private String bimLocation;
    /** 竖井顺序码 */
    private String shaftSequenceId;
    /** 功能类型 */
    private String shaftfunctype;


    /** BIM模型中轮廓坐标 */
    private ArrayNode outline;
    /** 对象类型 */
    private String objectType = OBJ_TYPE;
    /** 级联-竖井内的设备 */
    @CascadeColumn(graphCode = "MechInArch", relCode = "Eq2Sh", selectToObj = false)
    private List<AdmEquipment> equipmentList;
    /** 级联-竖井内的建筑 */
    @CascadeColumn(graphCode = "ArchSubset", relCode = "Bd2Sh", selectToObj = false)
    private List<AdmBuilding> buildingList;
    /** 级联-竖井内的系统 */
    @CascadeColumn(graphCode = "MechInArch", relCode = "Sy2Sh", selectToObj = false)
    private List<AdmSystem> systemList;
    /** 贯通关系   self = true  同样的对象查询时 id可以互相调换查询   */
    @CascadeColumn(graphCode = "ThroughRelationship", relCode = "Sh2Sh")
    private List<AdmShaft> shaftThroughList;
    /** 竖井内的业务空间  self = true  同样的对象查询时 id可以互相调换查询   */
    @CascadeColumn(graphCode = "ArchSubset", relCode = "Sh2Sp")
    private List<AdmSpace> spaceList;

    /** 对象类型code */
    private String classCode = OBJ_TYPE;
}
