v1.0.0: Device model

This commit is contained in:
2026-05-20 14:58:37 +10:00
parent 0a7ac9e501
commit b4e3581026
+29
View File
@@ -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;
/// <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>();
}