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 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.Create(model.Tipus), IsAlapertelmezett = model.IsAlapertelmezett }; } }