52 lines
1.5 KiB
C#
52 lines
1.5 KiB
C#
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;
|
|
|
|
/// <summary>HTML content for Content slides</summary>
|
|
public string? Content { get; set; }
|
|
|
|
/// <summary>URL for Embed slides (iframe src)</summary>
|
|
[MaxLength(2000)]
|
|
public string? EmbedUrl { get; set; }
|
|
|
|
/// <summary>URL or file path for ICS calendar</summary>
|
|
[MaxLength(2000)]
|
|
public string? IcsSource { get; set; }
|
|
|
|
/// <summary>Custom CSS classes or inline styles</summary>
|
|
public string? CustomCss { get; set; }
|
|
|
|
/// <summary>Background color hex</summary>
|
|
[MaxLength(20)]
|
|
public string? BackgroundColor { get; set; }
|
|
|
|
/// <summary>Background image URL</summary>
|
|
[MaxLength(500)]
|
|
public string? BackgroundImage { get; set; }
|
|
|
|
/// <summary>Background image sizing: cover, contain, fill, scale-down, auto</summary>
|
|
[MaxLength(20)]
|
|
public string BackgroundSize { get; set; } = "cover";
|
|
|
|
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
|
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
|
|
|
|
public ICollection<DeviceSlide> DeviceSlides { get; set; } = new List<DeviceSlide>();
|
|
}
|