feat(api): в сущность FIeld добавлено поле IsMultipleValue для реализации записи повторяющихся полей, как сервер приложений в компонентном составе виртуальных серверов

This commit is contained in:
Mikhail Kuznetsov
2025-09-22 15:25:17 +10:00
parent 8b0f173abe
commit 6ca6e65224
16 changed files with 3996 additions and 87 deletions

View File

@@ -9,7 +9,7 @@ namespace PARR.DAL.Models.Job
{
[Table("FieldFilters", Schema = DataContextSettings.Job)]
[Comment("Таблица описания критериев выборки аттрибутов ЭК")]
public class FieldFilter : IBase//TODO Почему этот не Job тра та та
public class JobFieldFilter : IBase
{
[Key]
public Guid Id { get; set; }
@@ -26,7 +26,7 @@ namespace PARR.DAL.Models.Job
[ForeignKey(nameof(FieldId))]
public UnitField? Field { get; set; }//TODO как-то определитесь уже просто Field или UnitField
public UnitField? UnitField { get; set; }
[ForeignKey(nameof(UnitFilterId))]
public JobUnitFilter? UnitFilter { get; set; }

View File

@@ -8,7 +8,7 @@ namespace PARR.DAL.Models.Job
[Table("RelationshipFilters", Schema = DataContextSettings.Job)]
[Comment("Таблица фильтров связей ЭК")]
[PrimaryKey(nameof(UnitFilterId), nameof(FieldId))]
public class JobRelationshipFilter //: IBase //TODO Почему этот Job тра та та
public class JobRelationshipFilter //: IBase
{
//[Key]
//public Guid Id { get; set; }
@@ -45,7 +45,7 @@ namespace PARR.DAL.Models.Job
[ForeignKey(nameof(FieldId))]
public UnitField? UnitField { get; set; }//TODO как-то определитесь уже просто Field или UnitField
public UnitField? UnitField { get; set; }

View File

@@ -24,7 +24,7 @@ namespace PARR.DAL.Models.Job
[ForeignKey(nameof(JobId))]
public Job? Job { get; set; }
public ICollection<FieldFilter> FieldFilters { get; set; } = new HashSet<FieldFilter>();
public ICollection<JobFieldFilter> FieldFilters { get; set; } = new HashSet<JobFieldFilter>();
public ICollection<JobRelationshipFilter> RelationshipFilters { get; set; } = new HashSet<JobRelationshipFilter>();
}

View File

@@ -41,6 +41,10 @@ namespace PARR.DAL.Models.Unit
/// </summary>
public string? DisplayName { get; set; }
/// <summary>
/// Могут ли принимать несколько значений. Из АИХ ИТ приходят значения разделённые запятой
/// </summary>
public bool? IsMultipleValue { get; set; }
public ICollection<UnitInField> Units { get; set; } = new HashSet<UnitInField>();
@@ -48,7 +52,7 @@ namespace PARR.DAL.Models.Unit
public ICollection<UnitInValue> UnitInValues { get; set; } = new HashSet<UnitInValue>();
public ICollection<UnitFieldInUnitFieldValue> FieldValues { get; set; } = new HashSet<UnitFieldInUnitFieldValue>();
public ICollection<UnitFieldInUnitFieldValue> UnitFieldValues { get; set; } = new HashSet<UnitFieldInUnitFieldValue>();
public ICollection<JobRelationshipFilter> RelationshipFilters { get; set; } = new HashSet<JobRelationshipFilter>();
}

View File

@@ -8,7 +8,7 @@ namespace PARR.DAL.Models.Unit
[Table("UnitInValues", Schema = DataContextSettings.Unit)]
[Comment("Таблица связи ЭК с полями и со значениями")]
[PrimaryKey(nameof(UnitId), nameof(FieldId))]
[PrimaryKey(nameof(UnitId), nameof(FieldId), nameof(ValueId))]
public class UnitInValue : IBaseDateModified, IBaseDateCreated
{
public Guid UnitId { get; set; }