2025-02-02 03:39:30 +03:00
|
|
|
|
using Mirea.Api.Endpoint.Common.Services;
|
|
|
|
|
using Mirea.Api.Endpoint.Configuration.Model.GeneralSettings;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
|
|
namespace Mirea.Api.Endpoint.Common.MapperDto;
|
|
|
|
|
|
|
|
|
|
public static class CronUpdateSkipConverter
|
|
|
|
|
{
|
|
|
|
|
public static List<Dto.Common.CronUpdateSkip> ConvertToDto(this IEnumerable<ScheduleSettings.CronUpdateSkip> pairPeriod) =>
|
|
|
|
|
pairPeriod.Select(x => new Dto.Common.CronUpdateSkip()
|
|
|
|
|
{
|
|
|
|
|
Start = x.Start,
|
|
|
|
|
End = x.End,
|
|
|
|
|
Date = x.Date
|
|
|
|
|
}).ToList();
|
|
|
|
|
public static List<ScheduleSettings.CronUpdateSkip> ConvertFromDto(this IEnumerable<Dto.Common.CronUpdateSkip> pairPeriod) =>
|
|
|
|
|
pairPeriod.Select(x => x.Get()).ToList();
|
2025-02-11 15:36:55 +03:00
|
|
|
|
}
|