- Added XML documentation to the `Handle` method in `UpdateEmailTemplateCommandHandler`. - Improved readability in `ReadEmailTemplateQueryHandler` by storing the mapped response in a variable. - Updated properties in `ReadEmailTemplateResponse` to be mutable and renamed `Type` to `Name` with a type change from `int` to `string`. - Added data annotations in `EmailTemplate` for `AddedWhen` and introduced a new nullable `ChangedWhen` property. - Included necessary using directives for data annotations in `EmailTemplate.cs`.
33 lines
1020 B
C#
33 lines
1020 B
C#
using DigitalData.Core.Abstractions;
|
|
using System.ComponentModel;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace EnvelopeGenerator.Domain.Entities
|
|
{
|
|
[Table("TBSIG_EMAIL_TEMPLATE", Schema = "dbo")]
|
|
public class EmailTemplate : IUnique<int>
|
|
{
|
|
[Key]
|
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
[Column("GUID")]
|
|
public int Id { get; set; }
|
|
|
|
[Column("NAME", TypeName = "nvarchar(64)")]
|
|
public string? Name { get; set; }
|
|
|
|
[Column("BODY", TypeName = "nvarchar(max)")]
|
|
public string? Body { get; set; }
|
|
|
|
[Column("SUBJECT", TypeName = "nvarchar(512)")]
|
|
public string? Subject { get; set; }
|
|
|
|
[Required]
|
|
[Column("ADDED_WHEN", TypeName = "datetime")]
|
|
[DefaultValue("GETDATE()")]
|
|
public DateTime AddedWhen { get; set; }
|
|
|
|
[Column("CHANGED_WHEN", TypeName = "datetime")]
|
|
public DateTime? ChangedWhen { get; set; }
|
|
}
|
|
} |