33 lines
1.1 KiB
C#
33 lines
1.1 KiB
C#
using System.ComponentModel;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using Kreta.Ellenorzo.Domain.VN.Email;
|
|
using Kreta.Ellenorzo.Dto.VN.Adatszotar;
|
|
using Kreta.Ellenorzo.Dto.VN.Documentation;
|
|
using Kreta.Enums;
|
|
|
|
namespace Kreta.Ellenorzo.Dto.VN.Email
|
|
{
|
|
public class EmailResponseDto
|
|
{
|
|
[Required, Description(DescriptionLookUp.ResponseModelEgyediAzonosito)]
|
|
public string Uid { get; set; }
|
|
|
|
[Required, Description(DescriptionLookUp.Email)]
|
|
public string Email { get; set; }
|
|
|
|
[Required, Description(DescriptionLookUp.EmailTipus)]
|
|
public AdatszotarResponseDto<EmailTipusEnum> Tipus { get; set; }
|
|
|
|
[Required, Description(DescriptionLookUp.EntitasAlapertelmezett)]
|
|
public bool IsAlapertelmezett { get; set; }
|
|
|
|
public static implicit operator EmailResponseDto(EmailResponse model) => model == null ? null : new EmailResponseDto
|
|
{
|
|
Uid = model.Uid.UidRaw,
|
|
Email = model.Email,
|
|
Tipus = AdatszotarResponseDto<EmailTipusEnum>.Create(model.Tipus),
|
|
IsAlapertelmezett = model.IsAlapertelmezett
|
|
};
|
|
}
|
|
}
|