v1.0.0: Device model
This commit is contained in:
@@ -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>();
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user