diff --git a/Models/Slide.cs b/Models/Slide.cs new file mode 100644 index 0000000..f46dcbc --- /dev/null +++ b/Models/Slide.cs @@ -0,0 +1,47 @@ +using System.ComponentModel.DataAnnotations; + +namespace NoticeBoard.Models; + +public enum SlideType +{ + Content, // WYSIWYG HTML content + Embed, // iframe embedded web content + IcsCalendar // ICS calendar events display +} + +public class Slide +{ + public int Id { get; set; } + + [Required, MaxLength(200)] + public string Name { get; set; } = string.Empty; + + public SlideType SlideType { get; set; } = SlideType.Content; + + /// HTML content for Content slides + public string? Content { get; set; } + + /// URL for Embed slides (iframe src) + [MaxLength(2000)] + public string? EmbedUrl { get; set; } + + /// URL or file path for ICS calendar + [MaxLength(2000)] + public string? IcsSource { get; set; } + + /// Custom CSS classes or inline styles + public string? CustomCss { get; set; } + + /// Background color hex + [MaxLength(20)] + public string? BackgroundColor { get; set; } + + /// Background image URL + [MaxLength(500)] + public string? BackgroundImage { get; set; } + + public DateTime CreatedAt { get; set; } = DateTime.UtcNow; + public DateTime UpdatedAt { get; set; } = DateTime.UtcNow; + + public ICollection DeviceSlides { get; set; } = new List(); +}