Files
hrynco-notification-service/HrynCo.NotificationService.Web/Controllers/Admin/ViewModels/EmailTemplateEditViewModel.cs
T
agrynco 81654c0d33 feat(templates): add service language template management
Add normalized service and template catalogs, scoped administration, migration, validation, and regression coverage.

Ref: IT-1601
2026-10-17 22:02:43 +03:00

22 lines
810 B
C#

using System.ComponentModel.DataAnnotations;
namespace HrynCo.NotificationService.Web.Controllers.Admin.ViewModels;
public sealed class EmailTemplateEditViewModel
{
public Guid? Id { get; set; }
public Guid ServiceId { get; set; }
public Guid Revision { get; set; }
[Required, StringLength(100)]
public string ServiceName { get; set; } = "";
[Required, StringLength(100)]
public string Key { get; set; } = "";
[Required]
public string VariablesJson { 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";
}