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,36 @@
namespace adas_core.Domain.Models.GroupedObservations;
public class Field
{
public string? Name { get; set; }
public int Last { get; set; } = 1;
public bool OnlyExpired { get; set; }
//public override bool Equals(object? obj)
//{
// // Verifica si el objeto pasado es nulo o no es del mismo tipo
// if (obj == null || GetType() != obj.GetType()) return false;
// // Convierte el objeto pasado al tipo Field
// var other = (Field)obj;
// // Compara las propiedades una por una, maneja el caso de valores nulos usando el operador de coalescencia nula (??)
// return Name == other.Name &&
// Last == other.Last &&
// OnlyExpired == other.OnlyExpired;
//}
//public override int GetHashCode()
//{
// unchecked
// {
// var hash = 17;
// hash = hash * 23 + (Name?.GetHashCode() ?? 0);
// hash = hash * 23 + Last.GetHashCode();
// hash = hash * 23 + OnlyExpired.GetHashCode();
// return hash;
// }
//}
}
@@ -0,0 +1,65 @@
using adas_core.Domain.Enums;
namespace adas_core.Domain.Models.GroupedObservations;
public class GroupedField
{
public GroupedField()
{
}
public GroupedField(
string? name,
List<string>? names,
string? group,
List<string>? startTimeShift,
int max,
GroupedObservationEnum.Regularity? regularity,
GroupedObservationEnum.Since since,
List<GroupedObservationEnum.Result>? result,
List<string>? labelList)
{
Name = name;
Names = names ?? [];
Group = group;
StartTimeShift = startTimeShift ?? [];
Max = max;
Regularity = regularity;
Since = since;
Result = result ?? [GroupedObservationEnum.Result.First];
LabelList = labelList;
}
public string? Name { get; init; }
public List<string> Names { get; init; } = [];
public string? Group { get; init; }
public List<string> StartTimeShift { get; init; } = [];
public int Max { get; init; }
public GroupedObservationEnum.Regularity? Regularity { get; init; }
public GroupedObservationEnum.Since Since { get; init; }
public List<GroupedObservationEnum.Result> Result { get; init; } = [];
public List<string>? LabelList { get; init; }
public List<string> GetNames()
{
return Names;
}
public override bool Equals(object? obj)
{
return obj is GroupedField field && Group == field.Group;
}
public override int GetHashCode()
{
return HashCode.Combine(Name, Group, Max, Regularity, Result);
}
}