using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JiShe.CollectBus.IoTDBProvider
{
///
/// 设备路径构建器
///
public static class DevicePathBuilder
{
///
/// 构建存储组路径
///
///
///
public static string BuildStorageGroupPath() where T : IoTEntity
{
var type = typeof(T);
return $"root.{type.GetProperty("SystemName")?.Name}.{type.GetProperty("ProjectCode")?.Name}";
}
///
/// 构建设备路径
///
///
///
///
public static string BuildDevicePath(T entity) where T : IoTEntity
{
return $"root.{entity.SystemName}.{entity.ProjectCode}.{entity.DeviceId}";
}
}
}