feat: add start term update and cron schedule update
This commit is contained in:
19
Endpoint/Common/MapperDto/CronUpdateSkipConverter.cs
Normal file
19
Endpoint/Common/MapperDto/CronUpdateSkipConverter.cs
Normal file
@ -0,0 +1,19 @@
|
||||
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();
|
||||
}
|
Reference in New Issue
Block a user