30 lines
802 B
C#
30 lines
802 B
C#
using MyOffice.Services.Account.Domain;
|
|
|
|
namespace MyOffice.Services.Account;
|
|
|
|
using AutoMapper;
|
|
using Data.Models.Accounts;
|
|
using Data.Models.Users;
|
|
|
|
public class AccountServiceProfile : Profile
|
|
{
|
|
public AccountServiceProfile()
|
|
{
|
|
CreateMap<User, UserDto>();
|
|
|
|
CreateMap<Account, AccountDto>()
|
|
.ForMember(x => x.HasMotions, o => o.MapFrom(x => x.Motions.Any()))
|
|
;
|
|
|
|
CreateMap<AccountDetailed, AccountDetailedDto>();
|
|
|
|
CreateMap<AccountAccess, AccountAccessDto>();
|
|
|
|
CreateMap<AccountAccountCategory, AccountAccountCategoryDto>();
|
|
|
|
CreateMap<AccountCategory, AccountCategoryDto>()
|
|
.ForMember(x => x.Id, o => o.MapFrom(x => x.Id))
|
|
.ForMember(x => x.Id, o => o.MapFrom(x => x.Id))
|
|
;
|
|
}
|
|
} |