package com.persagy.bdtp.adm.entity;

import cn.hutool.core.collection.CollUtil;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.persagy.bdtp.adm.entity.db.*;
import lombok.Data;

import java.util.List;

/**
 * 上传的数据结构
 */
@Data
public class UploadData {

	/** 上传任务id */
	private String uploadJobId;

	private List<ObjectNode> objects;

	private List<ObjectNode> relations;

	private List<AdmPipe> pipes;

	private List<AdmJobSpace> jobSpace;

	private List<AdmProblemArch> problemArch;

	private List<AdmProblemEquip> problemEquip;

	private List<AdmFile> file;

	private List<AdmQrCode> qrCode;


	/** 待废弃 */
	private List<AdmServeArea> serveArea;

	/** 待废弃 */
	private String buildingId;


	public boolean notEmpty() {
		return CollUtil.isNotEmpty(objects) || CollUtil.isNotEmpty(relations)
				|| CollUtil.isNotEmpty(pipes)
				|| CollUtil.isNotEmpty(jobSpace)
				|| CollUtil.isNotEmpty(problemArch) || CollUtil.isNotEmpty(problemEquip)
				|| CollUtil.isNotEmpty(file) || CollUtil.isNotEmpty(qrCode)
				|| CollUtil.isNotEmpty(serveArea);
	}

}
