diff --git a/Models/Device.cs b/Models/Device.cs new file mode 100644 index 0000000..5f3653b --- /dev/null +++ b/Models/Device.cs @@ -0,0 +1,29 @@ +using System.ComponentModel.DataAnnotations; + +namespace NoticeBoard.Models; + +public class Device +{ + public int Id { get; set; } + + [Required, MaxLength(100)] + public string Name { get; set; } = string.Empty; + + /// URL slug, e.g. "frontofhouse", "staffroom" + [Required, MaxLength(100)] + public string Slug { get; set; } = string.Empty; + + [Range(320, 7680)] + public int ResolutionWidth { get; set; } = 1920; + + [Range(240, 4320)] + public int ResolutionHeight { get; set; } = 1080; + + /// Default transition effect + [MaxLength(50)] + public string Transition { get; set; } = "fade"; + + public DateTime CreatedAt { get; set; } = DateTime.UtcNow; + + public ICollection DeviceSlides { get; set; } = new List(); +}