Files
2026-05-20 14:58:37 +10:00

30 lines
810 B
C#

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;
/// <summary>URL slug, e.g. "frontofhouse", "staffroom"</summary>
[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;
/// <summary>Default transition effect</summary>
[MaxLength(50)]
public string Transition { get; set; } = "fade";
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public ICollection<DeviceSlide> DeviceSlides { get; set; } = new List<DeviceSlide>();
}