using cuqmbr.TravelGuide.Application.Common.Mappings; using cuqmbr.TravelGuide.Domain.Entities; namespace cuqmbr.TravelGuide.Application.Employees; public sealed class EmployeeDto : IMapFrom { public Guid Uuid { get; set; } public string FirstName { get; set; } public string LastName { get; set; } public string Patronymic { get; set; } public string Sex { get; set; } public DateOnly BirthDate { get; set; } public Guid CompanyUuid { get; set; } public ICollection Documents { get; set; } public EmployeeAccountDto Account { get; set; } public void Mapping(MappingProfile profile) { profile.CreateMap() .ForMember( d => d.Uuid, opt => opt.MapFrom(s => s.Guid)) .ForMember( d => d.Sex, opt => opt.MapFrom(s => s.Sex.Name)) .ForMember( d => d.CompanyUuid, opt => opt.MapFrom(s => s.Company.Guid)); } }