Files
ersatztv/ErsatzTV/ViewModels/PlayoutTemplateEditViewModel.cs
T
Jason DoveandGitHub dcbe4837bf first pass at block scheduling (#1548)
* add blocks, block groups

* basic block and block item editing

* add template groups and basic template editing (name)

* add blocks to template calendar

* edit playout templates

* add calendar preview to playout templates

* add basic block playout building

* add mysql migration

* update changelog
2024-01-13 22:01:21 -06:00

19 lines
565 B
C#

using ErsatzTV.Application.Scheduling;
namespace ErsatzTV.ViewModels;
public class PlayoutTemplateEditViewModel
{
public int Id { get; set; }
public int Index { get; set; }
public TemplateViewModel Template { get; set; }
public List<DayOfWeek> DaysOfWeek { get; set; }
public List<int> DaysOfMonth { get; set; }
public List<int> MonthsOfYear { get; set; }
public bool AppliesToDate(DateTime date) =>
DaysOfWeek.Contains(date.DayOfWeek) &&
DaysOfMonth.Contains(date.Day) &&
MonthsOfYear.Contains(date.Month);
}