34 lines
897 B
C#
34 lines
897 B
C#
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace HrynCo.NotificationService.Web.Controllers.Admin.ViewModels;
|
|
|
|
public class EmailTemplateEditViewModel
|
|
{
|
|
public Guid? Id { get; set; }
|
|
|
|
[Required]
|
|
public string ServiceName { get; set; } = "";
|
|
|
|
[Required]
|
|
public string Key { get; set; } = "";
|
|
|
|
[Required]
|
|
public string LanguageCode { get; set; } = "";
|
|
|
|
[Required]
|
|
public string Subject { get; set; } = "";
|
|
|
|
[Required]
|
|
public string HtmlBody { get; set; } = "";
|
|
|
|
public string TextBody { get; set; } = "";
|
|
|
|
// JSON array: [{"name":"UserName","required":true}, ...]
|
|
public string VariablesJson { get; set; } = "[]";
|
|
public string? ServiceNameFilter { get; set; }
|
|
public string? KeyFilter { get; set; }
|
|
|
|
public bool IsNew => Id == null;
|
|
public string PageTitle => IsNew ? "Create Email Template" : "Edit Email Template";
|
|
}
|