diff --git a/src/ZB.MOM.WW.ScadaBridge.Commons/Entities/Instances/InstanceAttributeOverride.cs b/src/ZB.MOM.WW.ScadaBridge.Commons/Entities/Instances/InstanceAttributeOverride.cs index 0d129454..d0cc4e6f 100644 --- a/src/ZB.MOM.WW.ScadaBridge.Commons/Entities/Instances/InstanceAttributeOverride.cs +++ b/src/ZB.MOM.WW.ScadaBridge.Commons/Entities/Instances/InstanceAttributeOverride.cs @@ -1,3 +1,5 @@ +using ZB.MOM.WW.ScadaBridge.Commons.Types.Enums; + namespace ZB.MOM.WW.ScadaBridge.Commons.Entities.Instances; public class InstanceAttributeOverride @@ -10,6 +12,13 @@ public class InstanceAttributeOverride public string AttributeName { get; set; } /// Gets or sets the override value, or null to clear a previous override. public string? OverrideValue { get; set; } + /// + /// For attributes: the scalar type of each + /// element (String, Int32, Float, Double, Boolean, DateTime). Null for scalar + /// attributes. The element type is fixed by the base attribute and cannot be + /// changed on a derived template or instance override. + /// + public DataType? ElementDataType { get; set; } /// Initializes a new for the given attribute name. /// The name of the attribute to override. diff --git a/src/ZB.MOM.WW.ScadaBridge.Commons/Entities/Templates/TemplateAttribute.cs b/src/ZB.MOM.WW.ScadaBridge.Commons/Entities/Templates/TemplateAttribute.cs index 4e7c0e4c..9aad12a8 100644 --- a/src/ZB.MOM.WW.ScadaBridge.Commons/Entities/Templates/TemplateAttribute.cs +++ b/src/ZB.MOM.WW.ScadaBridge.Commons/Entities/Templates/TemplateAttribute.cs @@ -25,6 +25,13 @@ public class TemplateAttribute /// public DataType DataType { get; set; } /// + /// For attributes: the scalar type of each + /// element (String, Int32, Float, Double, Boolean, DateTime). Null for scalar + /// attributes. The element type is fixed by the base attribute and cannot be + /// changed on a derived template or instance override. + /// + public DataType? ElementDataType { get; set; } + /// /// Gets or sets a value indicating whether the attribute is locked from override. /// public bool IsLocked { get; set; } diff --git a/src/ZB.MOM.WW.ScadaBridge.Commons/Types/Enums/DataType.cs b/src/ZB.MOM.WW.ScadaBridge.Commons/Types/Enums/DataType.cs index 0a26af7d..f84d46d7 100644 --- a/src/ZB.MOM.WW.ScadaBridge.Commons/Types/Enums/DataType.cs +++ b/src/ZB.MOM.WW.ScadaBridge.Commons/Types/Enums/DataType.cs @@ -8,5 +8,6 @@ public enum DataType Double, String, DateTime, - Binary + Binary, + List } diff --git a/src/ZB.MOM.WW.ScadaBridge.Commons/Types/Flattening/FlattenedConfiguration.cs b/src/ZB.MOM.WW.ScadaBridge.Commons/Types/Flattening/FlattenedConfiguration.cs index 448d1313..74e6d9f9 100644 --- a/src/ZB.MOM.WW.ScadaBridge.Commons/Types/Flattening/FlattenedConfiguration.cs +++ b/src/ZB.MOM.WW.ScadaBridge.Commons/Types/Flattening/FlattenedConfiguration.cs @@ -66,6 +66,8 @@ public sealed record ResolvedAttribute public string? Value { get; init; } /// Gets the data type name. public string DataType { get; init; } = string.Empty; + /// For List attributes: the element scalar type name; null otherwise. + public string? ElementDataType { get; init; } /// Gets whether the attribute is locked. public bool IsLocked { get; init; } /// Gets the attribute description.