Вытащил солюшен на уровень выше, чтобы прощё было дотнетить
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is failing
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	continuous-integration/drone/push Build is failing
				
			This commit is contained in:
		
							
								
								
									
										22
									
								
								Infrastructure/Automapper/Profiles/ApplicantProfile.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								Infrastructure/Automapper/Profiles/ApplicantProfile.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,22 @@ | ||||
| using ApplicationLayer.Services.Applicants.Models; | ||||
| using ApplicationLayer.Services.AuthServices.Requests; | ||||
| using AutoMapper; | ||||
| using Domains.ApplicantDomain; | ||||
|  | ||||
| namespace Infrastructure.Automapper.Profiles; | ||||
|  | ||||
| public class ApplicantProfile : Profile | ||||
| { | ||||
|     public ApplicantProfile() | ||||
|     { | ||||
|         CreateMap<Applicant, ApplicantModel>(MemberList.Destination).ReverseMap(); | ||||
|  | ||||
|         CreateMap<RegisterApplicantRequest, Applicant>(MemberList.Destination) | ||||
|             .ForMember(a => a.UserId, opts => opts.Ignore()) | ||||
|             .ForMember(a => a.Name, | ||||
|                 opts => opts.MapFrom(r => r.ApplicantName)); | ||||
|  | ||||
|         CreateMap<NameModel, Name>().ReverseMap(); | ||||
|         CreateMap<PassportModel, Passport>().ReverseMap(); | ||||
|     } | ||||
| } | ||||
							
								
								
									
										18
									
								
								Infrastructure/Automapper/Profiles/PlaceOfWorkProfile.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								Infrastructure/Automapper/Profiles/PlaceOfWorkProfile.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | ||||
| using ApplicationLayer.Services.Applicants.Models; | ||||
| using AutoMapper; | ||||
| using Domains.ApplicantDomain; | ||||
|  | ||||
| namespace Infrastructure.Automapper.Profiles; | ||||
|  | ||||
| public class PlaceOfWorkProfile : Profile | ||||
| { | ||||
|     public PlaceOfWorkProfile() | ||||
|     { | ||||
|         CreateMap<PlaceOfWorkModel, PlaceOfWork>(MemberList.Destination) | ||||
|             .ForMember(p => p.Id, | ||||
|                 opts => opts.UseDestinationValue()) | ||||
|             .ReverseMap(); | ||||
|  | ||||
|         CreateMap<AddressModel, Address>().ReverseMap(); | ||||
|     } | ||||
| } | ||||
							
								
								
									
										18
									
								
								Infrastructure/Automapper/Profiles/UserProfile.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								Infrastructure/Automapper/Profiles/UserProfile.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | ||||
| using ApplicationLayer.Services.AuthServices.Common; | ||||
| using ApplicationLayer.Services.Users.Models; | ||||
| using AutoMapper; | ||||
| using Domains.Users; | ||||
|  | ||||
| namespace Infrastructure.Automapper.Profiles; | ||||
|  | ||||
| public class UserProfile : Profile | ||||
| { | ||||
|     public UserProfile() | ||||
|     { | ||||
|         CreateMap<AuthData, User>(MemberList.Destination) | ||||
|             .ForMember(u => u.Role, | ||||
|                 opts => opts.Ignore()); | ||||
|  | ||||
|         CreateMap<User, UserModel>(MemberList.Destination); | ||||
|     } | ||||
| } | ||||
							
								
								
									
										29
									
								
								Infrastructure/Automapper/Profiles/VisaApplicationProfile.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								Infrastructure/Automapper/Profiles/VisaApplicationProfile.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,29 @@ | ||||
| using ApplicationLayer.Services.VisaApplications.Models; | ||||
| using ApplicationLayer.Services.VisaApplications.Requests; | ||||
| using AutoMapper; | ||||
| using Domains.VisaApplicationDomain; | ||||
|  | ||||
| namespace Infrastructure.Automapper.Profiles; | ||||
|  | ||||
| public class VisaApplicationProfile : Profile | ||||
| { | ||||
|     public VisaApplicationProfile() | ||||
|     { | ||||
|         CreateMap<VisaApplication, VisaApplicationPreview>(MemberList.Destination); | ||||
|  | ||||
|         CreateMap<VisaApplication, VisaApplicationModel>(MemberList.Destination) | ||||
|             .ForMember(model => model.Applicant, | ||||
|                 opts => opts.Ignore()); | ||||
|  | ||||
|         CreateMap<VisaApplicationCreateRequest, VisaApplication>(MemberList.Destination) | ||||
|             .ForMember(va => va.RequestDate, | ||||
|                 opts => opts.Ignore()) | ||||
|             .ForMember(va => va.ApplicantId, | ||||
|                 opts => opts.Ignore()); | ||||
|  | ||||
|         CreateMap<PastVisaModel, PastVisa>().ReverseMap(); | ||||
|         CreateMap<PastVisitModel, PastVisit>().ReverseMap(); | ||||
|         CreateMap<ReentryPermitModel, ReentryPermit>().ReverseMap(); | ||||
|         CreateMap<PermissionToDestCountryModel, PermissionToDestCountry>().ReverseMap(); | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user