Creado apartir del commit b888de6c92056de294456f581a56e25e734d4ab7 de develop

This commit is contained in:
jrojas
2026-06-26 09:52:35 +02:00
commit 319fd3dfb0
746 changed files with 106610 additions and 0 deletions
@@ -0,0 +1,122 @@
using System.Xml.Serialization;
using adas_core.Domain.Enums;
using MongoDB.Bson;
using Newtonsoft.Json;
namespace adas_core.Domain.Models.MongoModels;
public class ConfigObservation
{
public Dictionary<string, ConfigObservation>? Grouped;
public ObjectId Id { get; set; }
public string? Code { get; set; }
public string? CodingSystem { get; set; }
public string? OriginalName { get; set; }
public string? ParentCode { get; set; }
public string? ParentCodingSystem { get; set; }
public string? ParentName { get; set; }
public string? Name { get; set; }
public string? Units { get; set; }
public ObservationEnum.ArrowType ArrowType { get; set; } = ObservationEnum.ArrowType.Default;
public bool ShowArrow { get; set; } = true;
public bool ShowValue { get; set; } = true;
public bool ForceUnits { get; set; }
public double? MinAlert { get; set; }
public double? MaxAlert { get; set; }
public double? MaxWarn { get; set; }
public double? MinWarn { get; set; }
public string? WarnColor { get; set; }
public string? AlertColor { get; set; }
public List<object>? AlertValues { get; set; }
public List<object>? WarningValues { get; set; }
public bool ForceWarn { get; set; }
public bool ForceAlert { get; set; }
public char? Alert { get; set; }
public int? Expires { get; set; }
public bool ShowOnExpired { get; set; }
public bool? Persist { get; set; }
public string? ColorOnExpired { get; set; }
public RetentionPolicy? RetentionPolicy { get; set; }
public int? RetentionPolicyValue { get; set; }
public string? LevelCondition { get; set; }
public Dictionary<string, object>? UiConfiguration { get; set; }
public AlarmConfig? Alarm { get; set; }
public string? Description { get; set; }
public object? RequiredValue { get; set; }
public List<ConfigObservation>? Preconditions { get; set; }
public bool CheckObservations { get; set; }
public List<ConfigObservation>? CreateObservation { get; set; }
public ObservationEnum.InsertMode InsertMode { get; set; } = ObservationEnum.InsertMode.Auto;
public bool TimeFromMessageTime { get; set; } = false;
public List<ColorRange>? ColorRanges { get; set; }
public DemoConfig? DemoConfig { get; set; }
public override string ToString()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
public class ColorRange
{
public ObservationEnum.ValueType? ValueType;
//Para números
public double? Min { get; set; }
public double? Max { get; set; }
//Para Strings
public string? MatchText { get; set; }
//Para booleanos
public bool? MatchBoolean { get; set; }
// Para fechas (en formato ISO)
public string? MinDate { get; set; }
public string? MaxDate { get; set; }
//Estética
public string? Color { get; set; }
public string? Label { get; set; }
}
}
public class DemoConfig
{
public int? MaxValue { get; set; }
public int? MinValue { get; set; }
public object? ValueOption { get; set; }
public bool? SetRandomValue { get; set; }
public bool? SetInValue { get; set; }
public int? RandomCount { get; set; }
public bool? ValueIsArray { get; set; }
public bool? RequireInitDate { get; set; }
public bool? RequireEndDate { get; set; }
public int? PriorityAlarm { get; set; }
//Campos para el simulador del Admin
public int? Periodicity { get; set; }
public ObservationEnum.XmlType? XmlType { get; set; }
}