* 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
19 lines
565 B
C#
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);
|
|
}
|