using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
namespace API.Controllers.Requests;
public record CreateNtfyConnectorRecord(string Name, string Url, string Username, string Password, string Topic, int Priority)
{
///
/// The Name of the Notification Connector
///
[Required]
[Description("The Name of the Notification Connector")]
public string Name { get; init; } = Name;
///
/// The Url of the Instance
///
/// Formatting placeholders: "%title" and "%text" will be replaced when notifications are sent
[Required]
[Url]
[Description("The Url of the Instance")]
public string Url { get; internal set; } = Url;
///
/// The Priority of Notifications
///
[Required]
[Description("The Priority of Notifications")]
public int Priority { get; init; } = Priority;
///
/// The Username used for authentication
///
[Required]
[Description("The Username used for authentication")]
public string Username { get; init; } = Username;
///
/// The Password used for authentication
///
[Required]
[Description("The Password used for authentication")]
public string Password { get; init; } = Password;
///
/// The Topic of Notifications
///
[Required]
[Description("The Topic of Notifications")]
public string Topic { get; init; } = Topic;
}