feat(templates): add service language template management
Add normalized service and template catalogs, scoped administration, migration, validation, and regression coverage. Ref: IT-1601
This commit is contained in:
+7
-19
@@ -2,32 +2,20 @@ using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace HrynCo.NotificationService.Web.Controllers.Admin.ViewModels;
|
||||
|
||||
public class EmailTemplateEditViewModel
|
||||
public sealed class EmailTemplateEditViewModel
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
|
||||
[Required]
|
||||
public Guid ServiceId { get; set; }
|
||||
public Guid Revision { get; set; }
|
||||
[Required, StringLength(100)]
|
||||
public string ServiceName { get; set; } = "";
|
||||
|
||||
[Required]
|
||||
[Required, StringLength(100)]
|
||||
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 List<EmailTemplateLanguageEditViewModel> Languages { get; set; } = [];
|
||||
public int ActiveLanguageIndex { get; set; }
|
||||
public string? KeyFilter { get; set; }
|
||||
|
||||
public bool IsNew => Id == null;
|
||||
public string PageTitle => IsNew ? "Create Email Template" : "Edit Email Template";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user