feat: add notice model, rules and service
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
using System;
|
||||
|
||||
namespace Jellyfin.Plugin.Herald.Notices;
|
||||
|
||||
/// <summary>
|
||||
/// A message shown once to each addressed user.
|
||||
/// </summary>
|
||||
public class Notice
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the id.
|
||||
/// </summary>
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the title.
|
||||
/// </summary>
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the body: plain text or the supported Markdown subset.
|
||||
/// </summary>
|
||||
public string Body { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether users have to accept the notice.
|
||||
/// </summary>
|
||||
public bool RequireAccept { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether the notice is shown at all.
|
||||
/// </summary>
|
||||
public bool Enabled { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the addressed users.
|
||||
/// </summary>
|
||||
public NoticeTarget Target { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the revision. Acknowledgements only count for the current revision.
|
||||
/// </summary>
|
||||
public int Revision { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the creation time (UTC).
|
||||
/// </summary>
|
||||
public DateTime CreatedAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the time of the last change (UTC).
|
||||
/// </summary>
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user