feat(dal,api,esppSync): в таблицу unitFields добавлено поле Code

This commit is contained in:
Mikhail Trubnikov
2025-11-28 09:12:26 +10:00
parent 5f84ccf4b8
commit c8345e3678
9 changed files with 4071 additions and 64 deletions

View File

@@ -6,6 +6,8 @@
public required string Name { get; set; }
public string? Code { get; set; }
public bool? IsMultipleValue { get; set; }
}

View File

@@ -126,13 +126,15 @@ namespace PARR.API.MappingProfiles
{
Id = fieldGroup.Key!.Id,
Name = string.IsNullOrEmpty(fieldGroup.Key.DisplayName) ? fieldGroup.Key.AihitName : fieldGroup.Key.DisplayName,
IsMultipleValue = fieldGroup.Key.IsMultipleValue
IsMultipleValue = fieldGroup.Key.IsMultipleValue,
Code = fieldGroup.Key.Code
},
Values = fieldGroup.Select(s => new UnitFieldValueResponse { Id = s.ValueId, Value = s.Value!.Value }).ToList()
}
).OrderBy(o => o.Field.Name)
));
CreateMap<Unit, UnitRelationshipsAndAttributesResponse>()
.ForMember(d => d.Childrens, o => o.MapFrom(s => s.ChildUnits.Select(t => t.ChildUnit).OrderBy(t => t.Name)))
.ForMember(d => d.Parents, o => o.MapFrom(s => s.ParentUnits.Select(t => t.ParentUnit).OrderBy(t => t.Name)));