feat(api): JobGroupResponse, TemplateResponse - отображение настроек автораспределения

This commit is contained in:
Mikhail Trubnikov
2026-01-22 14:05:48 +10:00
parent 1845154b26
commit 9e84ef8029
7 changed files with 60 additions and 5 deletions

View File

@@ -43,6 +43,7 @@ namespace PARR.API.MappingProfiles
.ForMember(d => d.StatusType, o => o.MapFrom(s => s.StatusType))
.ForMember(d => d.ScheduleExcludeType, o => o.MapFrom(s => s.Job!.Group!.ScheduleExcludeType))
.ForMember(d => d.ScheduleExcludeTypeCalendar, o => o.MapFrom(s => s.Job!.Group!.ScheduleExcludeTypeCalendar))
.ForMember(d => d.DistributionConfig, o => o.MapFrom(s => s.Job.Group.DistributionConfig))
;
// === Template ===
@@ -330,7 +331,6 @@ namespace PARR.API.MappingProfiles
#endregion
#region Job
CreateMap<Job, JobBaseResponse>()
@@ -368,9 +368,19 @@ namespace PARR.API.MappingProfiles
CreateMap<JobGroup, JobGroupResponse>()
.ForMember(d => d.ScheduleExcludeType, o => o.MapFrom(s => s.ScheduleExcludeType))
.ForMember(d => d.ScheduleExcludeTypeCalendar, o => o.MapFrom(s => s.ScheduleExcludeTypeCalendar));
.ForMember(d => d.ScheduleExcludeTypeCalendar, o => o.MapFrom(s => s.ScheduleExcludeTypeCalendar))
.ForMember(d => d.DistributionConfig, o => o.MapFrom(s => s.DistributionConfig));
#endregion
#region JobGroupDistributionConfig
CreateMap<JobGroupDistributionConfig, JobGroupDistributionConfigResponse>()
.ForMember(d => d.Period, o => o.MapFrom(s => s.DistributionPeriod));
CreateMap<DistributionPeriod, DistributionPeriodResponse>();
#endregion
#region ScheduleExcludeTypeCalendarResponse