1 feat: 重构触发器定义模型并完善触发器-变量关联功能
2
3 - 重命名TriggerDefinition类为Trigger,移除冗余的Definition后缀
4 - 更新所有相关接口和实现类以使用新的Trigger类名
5 - 在Variable模型中添加Triggers集合,实现变量到触发器的反向关联
6 - 在TriggerVariableManagementService中完善触发器与变量的双向关联逻辑
7 - 将触发器-变量关联数据加载集成到DataLoaderService中
8 - 在依赖注入容器中注册ITriggerVariableManagementService和ITriggerVariableAppService
9 - 更新触发器相关的DTO映射配置
10 - 修复触发器评估服务中的类型引用问题
11
12 此更改统一了触发器模型命名,完善了触发器与变量的双向关联关系,提高了代码的一致性和可维护性。
This commit is contained in:
@@ -30,7 +30,7 @@ namespace DMS.Core.Models.Triggers
|
||||
/// <summary>
|
||||
/// 触发器定义领域模型
|
||||
/// </summary>
|
||||
public class TriggerDefinition
|
||||
public class Trigger
|
||||
{
|
||||
/// <summary>
|
||||
/// 触发器唯一标识符
|
||||
@@ -1,6 +1,7 @@
|
||||
using DMS.Core.Enums;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using DMS.Core.Models.Triggers;
|
||||
|
||||
namespace DMS.Core.Models;
|
||||
|
||||
@@ -58,6 +59,10 @@ public class Variable
|
||||
/// 此变量的所有MQTT发布别名关联。一个变量可以关联多个MQTT服务器,每个关联可以有独立的别名。
|
||||
/// </summary>
|
||||
public List<MqttAlias> MqttAliases { get; set; } = new();
|
||||
/// <summary>
|
||||
/// 此变量的所有触发器关联。一个变量可以关联多个触发器
|
||||
/// </summary>
|
||||
public List<Trigger> Triggers { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// OPC UA NodeId (仅当 Protocol 为 OpcUa 时有效)。
|
||||
|
||||
Reference in New Issue
Block a user