This commit introduces new payment types, including "MangoPay" and "Cash", to the localization resource files for both German and English. A new enum `WalkPaymentType` is created to represent these payment types, and the `Walk` class is updated to include a required `PaymentType` property of this enum type. The database context is modified to add a `PaymentType` column to the `Walks` table, accompanied by a migration to implement this change and set a default value. The `WalkController` is updated to support filtering by the new `PaymentType` field, and the mapping profile is enhanced to include mappings for `WalkPaymentType` and its view model counterpart. View models are also updated to incorporate the new `PaymentType` and its display name. Front-end TypeScript files are adjusted to utilize the new `WalkPaymentType` enum and related properties, while the UI is enhanced to display the payment type in the details view of walks. Version numbers in various configuration files are incremented to reflect these changes.
953 lines
46 KiB
C#
953 lines
46 KiB
C#
using System;
|
|
using AutoMapper;
|
|
using gehGassi.Common.Extensions;
|
|
using gehGassi.Core.Interfaces;
|
|
using gehGassi.Domain.Advertisements;
|
|
using gehGassi.Domain.Base;
|
|
using gehGassi.Domain.Common;
|
|
using gehGassi.Domain.Customers;
|
|
using gehGassi.Domain.Dogs;
|
|
using gehGassi.Domain.Favourites;
|
|
using gehGassi.Domain.Feedback;
|
|
using gehGassi.Domain.Messages;
|
|
using gehGassi.Domain.News;
|
|
using gehGassi.Domain.Pages;
|
|
using gehGassi.Domain.Payment;
|
|
using gehGassi.Domain.Pushnotifications;
|
|
using gehGassi.Domain.Ratings;
|
|
using gehGassi.Domain.Reporting;
|
|
using gehGassi.Domain.Shop;
|
|
using gehGassi.Domain.Subscriptions;
|
|
using gehGassi.Domain.Users;
|
|
using gehGassi.Domain.Vouchers;
|
|
using gehGassi.Domain.Walks;
|
|
using gehGassi.Dto;
|
|
using gehGassi.Dto.Advertisements;
|
|
using gehGassi.Dto.Banners;
|
|
using gehGassi.Dto.Common;
|
|
using gehGassi.Dto.DogOwners;
|
|
using gehGassi.Dto.Dogs;
|
|
using gehGassi.Dto.DogWalkers;
|
|
using gehGassi.Dto.Favourites;
|
|
using gehGassi.Dto.Feedback;
|
|
using gehGassi.Dto.Listings;
|
|
using gehGassi.Dto.Lookup;
|
|
using gehGassi.Dto.Messages;
|
|
using gehGassi.Dto.News;
|
|
using gehGassi.Dto.Payment;
|
|
using gehGassi.Dto.Pushnotifications;
|
|
using gehGassi.Dto.Ratings;
|
|
using gehGassi.Dto.Reporting;
|
|
using gehGassi.Dto.Subscriptions;
|
|
using gehGassi.Dto.Vouchers;
|
|
using gehGassi.Dto.Walks;
|
|
using gehGassi.Web.Models;
|
|
using NetTopologySuite;
|
|
using NetTopologySuite.Geometries;
|
|
|
|
namespace gehGassi.Web.Mapper
|
|
{
|
|
/// <summary>
|
|
/// Definition der Mapping-Profile
|
|
/// </summary>
|
|
public class MappingProfile : Profile
|
|
{
|
|
/// <summary>
|
|
/// Erstellt eine Instanz
|
|
/// </summary>
|
|
public MappingProfile()
|
|
{
|
|
// Add as many of these lines as you need to map your objects
|
|
var geometryFactory = NtsGeometryServices.Instance.CreateGeometryFactory(srid: 4326);
|
|
|
|
CreateMap<Audit, AuditInfoVm>();
|
|
CreateMap<AuditWithNames, AuditInfoVm>();
|
|
CreateMap<AuditWithNames, AuditInfoWithNamesVm>();
|
|
|
|
CreateMap<FidoCredentialType, FidoCredentialTypeVm>();
|
|
CreateMap<FidoCredentialTypeVm, FidoCredentialType>();
|
|
|
|
CreateMap<Language, LanguageVm>();
|
|
|
|
CreateMap<FidoStoredCredential, FidoStoredCredentialListVm>();
|
|
CreateMap<FidoStoredCredential, EditFidoCredentialVm>();
|
|
CreateMap<EditFidoCredentialVm, FidoStoredCredential>();
|
|
|
|
CreateMap<Address, AddressVm>();
|
|
CreateMap<Address, AddressWithNamesVm>();
|
|
CreateMap<AddressVm, Address>();
|
|
|
|
CreateMap<Address, AddressRequiredVm>();
|
|
CreateMap<AddressRequiredVm, Address>();
|
|
|
|
CreateMap<OrderAddress, OrderAddressVm>();
|
|
CreateMap<OrderAddressVm, OrderAddress>();
|
|
|
|
CreateMap<Contact, ContactVm>();
|
|
CreateMap<ContactVm, Contact>();
|
|
|
|
CreateMap<Contact, ContactEmailRequiredVm>();
|
|
CreateMap<ContactEmailRequiredVm, Contact>();
|
|
|
|
CreateMap<ContactMin, ContactMinVm>();
|
|
CreateMap<ContactMinVm, ContactMin>();
|
|
|
|
CreateMap<SocialMedia, SocialMediaVm>();
|
|
CreateMap<SocialMediaVm, SocialMedia>();
|
|
|
|
CreateMap<SyncEntity, SyncEntityVm>();
|
|
CreateMap<SyncEntityVm, SyncEntity>()
|
|
.ForMember(c => c.Id, d => d.Ignore())
|
|
.ForMember(c => c.Index, d => d.Ignore())
|
|
.ForMember(c => c.Version, d => d.Ignore())
|
|
.ForMember(c => c.UpdatedAt, d => d.Ignore());
|
|
CreateMap<SyncEntityLocalizable, SyncEntityLocalizableVm>();
|
|
CreateMap<SyncEntityLocalizableVm, SyncEntityLocalizable>();
|
|
CreateMap<SyncEntity, SyncEntityListVm>();
|
|
CreateMap<SyncEntityLocalizable, SyncEntityLocalizableListVm>();
|
|
CreateMap<SyncEntityVw, SyncEntityListVm>();
|
|
CreateMap<SyncEntityLocalizableVw, SyncEntityLocalizableListVm>();
|
|
|
|
CreateMap<Sex, SexVm>();
|
|
CreateMap<SexVm, Sex>();
|
|
|
|
CreateMap<OnlineStatus, OnlineStatusVm>();
|
|
CreateMap<OnlineStatusVm, OnlineStatus>();
|
|
|
|
CreateMap<FaqType, FaqTypeVm>();
|
|
CreateMap<FaqTypeVm, FaqType>();
|
|
|
|
CreateMap<ListingType, ListingTypeVm>();
|
|
CreateMap<ListingTypeVm, ListingType>();
|
|
|
|
CreateMap<ListingStatus, ListingStatusVm>();
|
|
CreateMap<ListingStatusVm, ListingStatus>();
|
|
|
|
CreateMap<AdvertisementStatus, AdvertisementStatusVm>();
|
|
CreateMap<AdvertisementStatusVm, AdvertisementStatus>();
|
|
|
|
CreateMap<GeoMode, GeoModeVm>();
|
|
CreateMap<GeoModeVm, GeoMode>();
|
|
|
|
CreateMap<PaymentType, PaymentTypeVm>();
|
|
CreateMap<PaymentTypeVm, PaymentType>();
|
|
|
|
CreateMap<PaymentStatus, PaymentStatusVm>();
|
|
CreateMap<PaymentStatusVm, PaymentStatus>();
|
|
|
|
CreateMap<WalkPaymentType, WalkPaymentTypeVm>();
|
|
CreateMap<WalkPaymentTypeVm, WalkPaymentType>();
|
|
|
|
CreateMap<OrderStatus, OrderStatusVm>();
|
|
CreateMap<OrderStatusVm, OrderStatus>();
|
|
|
|
CreateMap<ShipmentType, ShipmentTypeVm>();
|
|
CreateMap<ShipmentTypeVm, ShipmentType>();
|
|
|
|
CreateMap<ShipmentStatus, ShipmentStatusVm>();
|
|
CreateMap<ShipmentStatusVm, ShipmentStatus>();
|
|
|
|
CreateMap<ShopVisibility, ShopVisibilityVm>();
|
|
CreateMap<ShopVisibilityVm, ShopVisibility>();
|
|
|
|
CreateMap<ProductType, ProductTypeVm>();
|
|
CreateMap<ProductTypeVm, ProductType>();
|
|
|
|
CreateMap<Salutation, SalutationVm>();
|
|
CreateMap<SalutationVm, Salutation>();
|
|
|
|
CreateMap<OrderSource, OrderSourceVm>();
|
|
CreateMap<OrderSourceVm, OrderSource>();
|
|
|
|
CreateMap<PriceType, PriceTypeVm>();
|
|
CreateMap<PriceTypeVm, PriceType>();
|
|
|
|
CreateMap<PriceAliquotType, PriceAliquotTypeVm>();
|
|
CreateMap<PriceAliquotTypeVm, PriceAliquotType>();
|
|
|
|
CreateMap<ProductStartType, ProductStartTypeVm>();
|
|
CreateMap<ProductStartTypeVm, ProductStartType>();
|
|
|
|
CreateMap<ShipmentCalculationType, ShipmentCalculationTypeVm>();
|
|
CreateMap<ShipmentCalculationTypeVm, ShipmentCalculationType>();
|
|
|
|
CreateMap<BannerLocation, BannerLocationVm>();
|
|
CreateMap<BannerLocationVm, BannerLocation>();
|
|
|
|
CreateMap<BannerSize, BannerSizeVm>();
|
|
CreateMap<BannerSizeVm, BannerSize>();
|
|
|
|
CreateMap<BannerStatus, BannerStatusVm>();
|
|
CreateMap<BannerStatusVm, BannerStatus>();
|
|
|
|
CreateMap<PinStatus, PinStatusVm>();
|
|
CreateMap<PinStatusVm, PinStatus>();
|
|
|
|
CreateMap<DogSex, DogSexVm>();
|
|
CreateMap<DogSexVm, DogSex>();
|
|
|
|
CreateMap<DogSize, DogSizeVm>();
|
|
CreateMap<DogSizeVm, DogSize>();
|
|
|
|
CreateMap<DogAggressionLevel, DogAggressionLevelVm>();
|
|
CreateMap<DogAggressionLevelVm, DogAggressionLevel>();
|
|
|
|
CreateMap<DogFeedingTimes, DogFeedingTimesVm>();
|
|
CreateMap<DogFeedingTimesVm, DogFeedingTimes>();
|
|
|
|
CreateMap<NewsStatus, NewsStatusVm>();
|
|
CreateMap<NewsStatusVm, NewsStatus>();
|
|
|
|
CreateMap<NewsVisibility, NewsVisibilityVm>();
|
|
CreateMap<NewsVisibilityVm, NewsVisibility>();
|
|
|
|
CreateMap<AppUserType, AppUserTypeVm>();
|
|
CreateMap<AppUserTypeVm, AppUserType>();
|
|
|
|
CreateMap<DogWalkRequestType, DogWalkRequestTypeVm>();
|
|
CreateMap<DogWalkRequestTypeVm, DogWalkRequestType>();
|
|
|
|
CreateMap<CertificateStatus, CertificateStatusVm>();
|
|
CreateMap<CertificateStatusVm, CertificateStatus>();
|
|
|
|
CreateMap<AppMode, AppModeVm>();
|
|
CreateMap<AppModeVm, AppMode>();
|
|
|
|
CreateMap<AppFeedbackType, AppFeedbackTypeVm>();
|
|
CreateMap<AppFeedbackTypeVm, AppFeedbackType>();
|
|
|
|
CreateMap<AppFeedbackStatus, AppFeedbackStatusVm>();
|
|
CreateMap<AppFeedbackStatusVm, AppFeedbackStatus>();
|
|
|
|
CreateMap<PayInType, PayInTypeVm>();
|
|
CreateMap<PayInTypeVm, PayInType>();
|
|
|
|
CreateMap<WalkComplaintStatus, WalkComplaintStatusVm>();
|
|
CreateMap<WalkComplaintStatusVm, WalkComplaintStatus>();
|
|
|
|
CreateMap<WalkComplaintType, WalkComplaintTypeVm>();
|
|
CreateMap<WalkComplaintTypeVm, WalkComplaintType>();
|
|
|
|
CreateMap<WalkComplaintSource, WalkComplaintSourceVm>();
|
|
CreateMap<WalkComplaintSourceVm, WalkComplaintSource>();
|
|
|
|
CreateMap<WalkType, WalkTypeVm>();
|
|
CreateMap<WalkTypeVm, WalkType>();
|
|
|
|
CreateMap<WalkServiceType, WalkServiceTypeVm>();
|
|
CreateMap<WalkServiceTypeVm, WalkServiceType>();
|
|
|
|
CreateMap<AppUserReportStatus, AppUserReportStatusVm>();
|
|
CreateMap<AppUserReportStatusVm, AppUserReportStatus>();
|
|
|
|
CreateMap<AppUserReportSection, AppUserReportSectionVm>();
|
|
CreateMap<AppUserReportSectionVm, AppUserReportSection>();
|
|
|
|
CreateMap<AppUserReportType, AppUserReportTypeVm>();
|
|
CreateMap<AppUserReportTypeVm, AppUserReportType>();
|
|
|
|
CreateMap<AppUserReportBlockType, AppUserReportBlockTypeVm>();
|
|
CreateMap<AppUserReportBlockTypeVm, AppUserReportBlockType>();
|
|
|
|
CreateMap<PublicWalkRequestType, PublicWalkRequestTypeVm>();
|
|
CreateMap<PublicWalkRequestTypeVm, PublicWalkRequestType>();
|
|
|
|
CreateMap<PublicWalkRequestStatus, PublicWalkRequestStatusVm>();
|
|
CreateMap<PublicWalkRequestStatusVm, PublicWalkRequestStatus>();
|
|
|
|
CreateMap<WalkStatus, WalkStatusVm>();
|
|
CreateMap<WalkStatusVm, WalkStatus>();
|
|
|
|
CreateMap<CancellationSource, CancellationSourceVm>();
|
|
CreateMap<CancellationSourceVm, CancellationSource>();
|
|
|
|
CreateMap<RatingTarget, RatingTargetVm>();
|
|
CreateMap<RatingTargetVm, RatingTarget>();
|
|
|
|
CreateMap<PublicWalkResponseStatus, PublicWalkResponseStatusVm>();
|
|
CreateMap<PublicWalkResponseStatusVm, PublicWalkResponseStatus>();
|
|
|
|
CreateMap<Platform, PlatformVm>();
|
|
CreateMap<PlatformVm, Platform>();
|
|
|
|
CreateMap<VoucherCampaignType, VoucherCampaignTypeVm>();
|
|
CreateMap<VoucherCampaignTypeVm, VoucherCampaignType>();
|
|
|
|
CreateMap<VoucherCampaignStatus, VoucherCampaignStatusVm>();
|
|
CreateMap<VoucherCampaignStatusVm, VoucherCampaignStatus>();
|
|
|
|
CreateMap<SubscriptionLength, SubscriptionLengthVm>();
|
|
CreateMap<SubscriptionLengthVm, SubscriptionLength>();
|
|
|
|
CreateMap<ApplicationUser, ApplicationUserListVm>();
|
|
|
|
CreateMap<ApplicationUserWithNames, ApplicationUserListVm>();
|
|
|
|
CreateMap<ApplicationUser, ApplicationUserVm>();
|
|
CreateMap<ApplicationUserVm, ApplicationUser>();
|
|
CreateMap<ApplicationUser, ApplicationUserInfoVm>().ForMember(c => c.NameForLookup, d => d.MapFrom(e => e.NameForLookup));
|
|
|
|
CreateMap<CustomerType, CustomerTypeVm>();
|
|
CreateMap<CustomerTypeVm, CustomerType>()
|
|
.ForMember(c => c.Created, d => d.Ignore());
|
|
|
|
CreateMap<Customer, CustomerVm>();
|
|
CreateMap<CustomerVm, Customer>().ForMember(c => c.Created, d => d.Ignore());
|
|
CreateMap<CustomerWithNames, CustomerListVm>();
|
|
CreateMap<Customer, CustomerCrudVm>();
|
|
CreateMap<CustomerCrudVm, Customer>().ForMember(c => c.Created, d => d.Ignore());
|
|
|
|
CreateMap<AdvertisementCategory, AdvertisementCategoryVm>();
|
|
CreateMap<AdvertisementCategoryVm, AdvertisementCategory>()
|
|
.ForMember(c => c.Created, d => d.Ignore());
|
|
CreateMap<AdvertisementCategoryWithNames, AdvertisementCategoryListVm>();
|
|
|
|
CreateMap<Advertisement, AdvertisementVm>()
|
|
.ForMember(c => c.Lat, d => d.MapFrom(e => e.Location.Y))
|
|
.ForMember(c => c.Lng, d => d.MapFrom(e => e.Location.X));
|
|
CreateMap<AdvertisementVm, Advertisement>()
|
|
.ForMember(c => c.Location, d => d.MapFrom(e => geometryFactory.CreatePoint(new Coordinate(e.Lng, e.Lat))))
|
|
.ForMember(c => c.Created, d => d.Ignore());
|
|
CreateMap<Advertisement, AdvertisementCrudVm>()
|
|
.ForPath(c => c.Lat, d => d.MapFrom(e => e.Location.Y))
|
|
.ForPath(c => c.Lng, d => d.MapFrom(e => e.Location.X));
|
|
CreateMap<AdvertisementCrudVm, Advertisement>()
|
|
.ForMember(c => c.Location, d => d.MapFrom(e => geometryFactory.CreatePoint(new Coordinate(e.Lng, e.Lat))))
|
|
.ForMember(c => c.Created, d => d.Ignore());
|
|
CreateMap<AdvertisementWithNames, AdvertisementListVm>();
|
|
|
|
CreateMap<Branch, BranchVm>();
|
|
CreateMap<BranchVm, Branch>()
|
|
.ForMember(c => c.Created, d => d.Ignore());
|
|
CreateMap<BranchWithNames, BranchListVm>();
|
|
|
|
CreateMap<ShopSettings, ShopSettingsVm>();
|
|
CreateMap<ShopSettingsVm, ShopSettings>();
|
|
|
|
CreateMap<ShipmentCost, ShipmentCostVm>();
|
|
CreateMap<ShipmentCostVm, ShipmentCost>();
|
|
CreateMap<ShipmentCost, ShipmentCostCrudVm>();
|
|
CreateMap<ShipmentCostCrudVm, ShipmentCost>();
|
|
|
|
CreateMap<TaxRate, TaxRateVm>();
|
|
CreateMap<TaxRateVm, TaxRate>();
|
|
CreateMap<TaxRate, TaxRateCrudVm>();
|
|
CreateMap<TaxRateCrudVm, TaxRate>();
|
|
CreateMap<TaxRateWithNames, TaxRateListVm>();
|
|
|
|
CreateMap<AppUser, AppUserVm>();
|
|
CreateMap<AppUserVm, AppUser>()
|
|
.ForMember(c => c.LockedUntil, d => d.Ignore())
|
|
.ForMember(c => c.Created, d => d.Ignore())
|
|
.ForMember(c => c.Location, d => d.Ignore())
|
|
.ForMember(c => c.LockedUntil, d => d.Ignore())
|
|
.ForMember(c => c.LockedReason, d => d.Ignore())
|
|
.ForMember(c => c.LockedCount, d => d.Ignore())
|
|
.ForMember(c => c.Anonymized, d => d.Ignore())
|
|
.ForMember(c => c.AnonymizedDate, d => d.Ignore());
|
|
CreateMap<AppUser, AppUserCrudVm>();
|
|
CreateMap<AppUserCrudVm, AppUser>()
|
|
.ForMember(c => c.LockedUntil, d => d.Ignore())
|
|
.ForMember(c => c.Created, d => d.Ignore())
|
|
.ForMember(c => c.Location, d => d.Ignore())
|
|
.ForMember(c => c.LockedUntil, d => d.Ignore())
|
|
.ForMember(c => c.LockedReason, d => d.Ignore())
|
|
.ForMember(c => c.LockedCount, d => d.Ignore())
|
|
.ForMember(c => c.PaymentId, d => d.Ignore())
|
|
.ForMember(c => c.BankId, d => d.Ignore())
|
|
.ForMember(c => c.TermsAcceptedDate, d => d.Ignore())
|
|
.ForMember(c => c.PrivacyAcceptedDate, d => d.Ignore())
|
|
.ForMember(c => c.VerifiedDate, d => d.Ignore())
|
|
.ForMember(c => c.KycPassedDate, d => d.Ignore())
|
|
.ForMember(c => c.Anonymized, d => d.Ignore())
|
|
.ForMember(c => c.AnonymizedDate, d => d.Ignore());
|
|
CreateMap<AppUser, AppUserListVm>()
|
|
.ForMember(c => c.Email, d => d.MapFrom(e => e.Contact.Email))
|
|
.ForMember(c => c.Zip, d => d.MapFrom(e => e.Address.Zip))
|
|
.ForMember(c => c.City, d => d.MapFrom(e => e.Address.City))
|
|
.ForMember(c => c.CountryCode, d => d.MapFrom(e => e.Address.CountryCode))
|
|
.ForMember(c => c.State, d => d.MapFrom(e => e.Address.State));
|
|
|
|
CreateMap<ProductCategory, ProductCategoryVm>();
|
|
CreateMap<ProductCategoryVm, ProductCategory>()
|
|
.ForMember(c => c.Created, d => d.Ignore());
|
|
CreateMap<ProductCategory, ProductCategoryCrudVm>();
|
|
CreateMap<ProductCategoryCrudVm, ProductCategory>()
|
|
.ForMember(c => c.Created, d => d.Ignore());
|
|
CreateMap<ProductCategoryWithNames, ProductCategoryListVm>();
|
|
CreateMap<ProductCategoryWithNamesTree, ProductCategoryTreeVm>();
|
|
|
|
CreateMap<Product, ProductVm>();
|
|
CreateMap<ProductVm, Product>()
|
|
.ForMember(c => c.Created, d => d.Ignore());
|
|
CreateMap<Product, ProductCrudVm>();
|
|
CreateMap<ProductCrudVm, Product>()
|
|
.ForMember(c => c.Created, d => d.Ignore());
|
|
CreateMap<ProductWithNames, ProductListVm>();
|
|
CreateMap<ProductWithNamesCountry, ProductListCountryVm>();
|
|
CreateMap<ProductWithNamesCountry, ProductShopVm>();
|
|
|
|
CreateMap<ProductCountry, ProductCountryVm>();
|
|
CreateMap<ProductCountryVm, ProductCountry>();
|
|
CreateMap<ProductCountry, ProductCountryCrudVm>();
|
|
CreateMap<ProductCountryCrudVm, ProductCountry>();
|
|
|
|
CreateMap<Listing, ListingVm>()
|
|
.ForMember(c => c.Lat, d => d.MapFrom(e => e.Location.Y))
|
|
.ForMember(c => c.Lng, d => d.MapFrom(e => e.Location.X));
|
|
CreateMap<ListingVm, Listing>()
|
|
.ForMember(c => c.Location, d => d.MapFrom(e => geometryFactory.CreatePoint(new Coordinate(e.Lng, e.Lat))))
|
|
.ForMember(c => c.Created, d => d.Ignore());
|
|
CreateMap<Listing, ListingCrudVm>()
|
|
.ForMember(c => c.Lat, d => d.MapFrom(e => e.Location.Y))
|
|
.ForMember(c => c.Lng, d => d.MapFrom(e => e.Location.X));
|
|
CreateMap<ListingCrudVm, Listing>()
|
|
.ForMember(c => c.Location, d => d.MapFrom(e => geometryFactory.CreatePoint(new Coordinate(e.Lng, e.Lat))))
|
|
.ForMember(c => c.Created, d => d.Ignore());
|
|
CreateMap<ListingWithNames, ListingListVm>();
|
|
CreateMap<ListingBookVm, Listing>();
|
|
|
|
CreateMap<Banner, BannerVm>()
|
|
.ForMember(c => c.Lat, d => d.MapFrom(e => e.Location.Y))
|
|
.ForMember(c => c.Lng, d => d.MapFrom(e => e.Location.X));
|
|
CreateMap<BannerVm, Banner>()
|
|
.ForMember(c => c.Location, d => d.MapFrom(e => geometryFactory.CreatePoint(new Coordinate(e.Lng, e.Lat))))
|
|
.ForMember(c => c.CurrentViews, d => d.Ignore())
|
|
.ForMember(c => c.EndDate, d => d.Ignore())
|
|
.ForMember(c => c.Created, d => d.Ignore());
|
|
CreateMap<Banner, BannerCrudVm>()
|
|
.ForMember(c => c.Lat, d => d.MapFrom(e => e.Location.Y))
|
|
.ForMember(c => c.Lng, d => d.MapFrom(e => e.Location.X));
|
|
CreateMap<BannerCrudVm, Banner>()
|
|
.ForMember(c => c.Location, d => d.MapFrom(e => geometryFactory.CreatePoint(new Coordinate(e.Lng, e.Lat))))
|
|
.ForMember(c => c.CurrentViews, d => d.Ignore())
|
|
.ForMember(c => c.EndDate, d => d.Ignore())
|
|
.ForMember(c => c.Created, d => d.Ignore());
|
|
CreateMap<BannerWithNames, BannerListVm>();
|
|
|
|
CreateMap<Pin, PinVm>()
|
|
.ForMember(c => c.Lat, d => d.MapFrom(e => e.Location.Y))
|
|
.ForMember(c => c.Lng, d => d.MapFrom(e => e.Location.X));
|
|
CreateMap<PinVm, Pin>()
|
|
.ForMember(c => c.Location, d => d.MapFrom(e => geometryFactory.CreatePoint(new Coordinate(e.Lng, e.Lat))))
|
|
.ForMember(c => c.Created, d => d.Ignore());
|
|
CreateMap<Pin, PinCrudVm>()
|
|
.ForMember(c => c.Lat, d => d.MapFrom(e => e.Location.Y))
|
|
.ForMember(c => c.Lng, d => d.MapFrom(e => e.Location.X));
|
|
CreateMap<PinCrudVm, Pin>()
|
|
.ForMember(c => c.Location, d => d.MapFrom(e => geometryFactory.CreatePoint(new Coordinate(e.Lng, e.Lat))))
|
|
.ForMember(c => c.Created, d => d.Ignore());
|
|
CreateMap<PinWithNames, PinListVm>()
|
|
.ForMember(c => c.Lat, d => d.MapFrom(e => e.Location.Y))
|
|
.ForMember(c => c.Lng, d => d.MapFrom(e => e.Location.X));
|
|
|
|
CreateMap<Cart, CartVm>();
|
|
CreateMap<CartWithNames, CartListVm>();
|
|
CreateMap<CartItem, CartItemVm>();
|
|
CreateMap<CartItemWithNames, CartItemListVm>();
|
|
|
|
CreateMap<Customer, CheckoutAddressVm>()
|
|
.ForMember(c => c.BillingAddress, d => d.MapFrom(e => e.Address))
|
|
.ForMember(c => c.Company, d => d.MapFrom(e => e.Name))
|
|
.ForMember(c => c.DeliveryTitle, d => d.MapFrom(e => e.Title))
|
|
.ForMember(c => c.DeliveryFirstName, d => d.MapFrom(e => e.FirstName))
|
|
.ForMember(c => c.DeliveryLastName, d => d.MapFrom(e => e.LastName))
|
|
.ForMember(c => c.DeliveryCompany, d => d.MapFrom(e => e.Name))
|
|
.ForMember(c => c.DeliveryVat, d => d.MapFrom(e => e.Vat));
|
|
|
|
CreateMap<Order, OrderVm>();
|
|
CreateMap<Order, OrderListVm>();
|
|
CreateMap<OrderItem, OrderItemVm>();
|
|
|
|
CreateMap<DogRace, DogRaceVm>();
|
|
CreateMap<DogRaceVm, DogRace>()
|
|
.ForMember(c => c.Created, d => d.Ignore());
|
|
CreateMap<DogRaceWithNames, DogRaceListVm>();
|
|
|
|
CreateMap<Dog, DogVm>();
|
|
CreateMap<DogVm, Dog>().ForMember(c => c.Created, d => d.Ignore());
|
|
CreateMap<DogWithNames, DogListVm>();
|
|
CreateMap<Dog, DogCrudVm>();
|
|
CreateMap<DogCrudVm, Dog>().ForMember(c => c.Created, d => d.Ignore());
|
|
CreateMap<DogWithNames, DogMinInfo>()
|
|
.ForMember(c => c.AverageRating, d => d.MapFrom(e => e.RatingStatistics_AverageRating));
|
|
|
|
CreateMap<NewsCategory, NewsCategoryVm>();
|
|
CreateMap<NewsCategoryVm, NewsCategory>()
|
|
.ForMember(c => c.Created, d => d.Ignore());
|
|
CreateMap<NewsCategoryWithNames, NewsCategoryListVm>();
|
|
|
|
CreateMap<News, NewsVm>()
|
|
.ForMember(c => c.Lat, d => d.MapFrom(e => e.Location.Y))
|
|
.ForMember(c => c.Lng, d => d.MapFrom(e => e.Location.X));
|
|
CreateMap<NewsVm, News>()
|
|
.ForMember(c => c.Created, d => d.Ignore())
|
|
.ForMember(c => c.Location, d => d.MapFrom(e => geometryFactory.CreatePoint(new Coordinate(e.Lng,e.Lat))));
|
|
CreateMap<NewsWithNames, NewsListVm>();
|
|
CreateMap<News, NewsCrudVm>()
|
|
.ForPath(c => c.Lat, d => d.MapFrom(e => e.Location.Y))
|
|
.ForPath(c => c.Lng, d => d.MapFrom(e => e.Location.X));
|
|
CreateMap<NewsCrudVm, News>()
|
|
.ForMember(c => c.Created, d => d.Ignore())
|
|
.ForMember(c => c.Location, d => d.MapFrom(e => geometryFactory.CreatePoint(new Coordinate(e.Lng, e.Lat))));
|
|
|
|
CreateMap<DogWalkerProfile, DogWalkerProfileVm>();
|
|
CreateMap<DogWalkerProfileVm, DogWalkerProfile>();
|
|
|
|
CreateMap<Page, PageVm>();
|
|
CreateMap<PageVm, Page>();
|
|
CreateMap<PageWithNames, PageListVm>();
|
|
CreateMap<PageWithNames, PageViewVm>();
|
|
|
|
CreateMap<Faq, FaqVm>();
|
|
CreateMap<FaqVm, Faq>()
|
|
.ForMember(c => c.Created, d => d.Ignore());
|
|
CreateMap<FaqWithNames, FaqListVm>();
|
|
|
|
CreateMap<AppFeedback, AppFeedbackVm>();
|
|
CreateMap<AppFeedbackVm, AppFeedback>().ForMember(c => c.Created, d => d.Ignore());
|
|
CreateMap<AppFeedback, AppFeedbackListVm>();
|
|
|
|
CreateMap<TransactionFee, TransactionFeeVm>();
|
|
CreateMap<TransactionFeeVm, TransactionFee>();
|
|
CreateMap<TransactionFee, TransactionFeeListVm>();
|
|
|
|
CreateMap<GehGassiFee, GehGassiFeeVm>();
|
|
CreateMap<GehGassiFeeVm, GehGassiFee>();
|
|
|
|
CreateMap<WalkComplaint, WalkComplaintVm>();
|
|
CreateMap<WalkComplaintVm, WalkComplaint>().ForMember(c => c.Created, d => d.Ignore());
|
|
CreateMap<WalkComplaintWithNames, WalkComplaintListVm>();
|
|
|
|
CreateMap<AppUserReport, AppUserReportVm>();
|
|
CreateMap<AppUserReportVm, AppUserReport>()
|
|
.ForMember(c => c.ReportingAppUserId, d => d.Ignore())
|
|
.ForMember(c => c.ReportedAppUserId, d => d.Ignore())
|
|
.ForMember(c => c.SectionId, d => d.Ignore())
|
|
.ForMember(c => c.SectionId2, d => d.Ignore())
|
|
.ForMember(c => c.UpdatedBy, d => d.Ignore())
|
|
.ForMember(c => c.Updated, d => d.Ignore())
|
|
.ForMember(c => c.CreatedBy, d => d.Ignore())
|
|
.ForMember(c => c.Created, d => d.Ignore());
|
|
CreateMap<AppUserReportWithNames, AppUserReportListVm>();
|
|
|
|
CreateMap<PublicWalkRequestWithNames, PublicWalkRequestWithNamesVm>();
|
|
CreateMap<PublicWalkRequestWithNames, PublicWalkRequestListVm>();
|
|
|
|
CreateMap<WalkWithNames, WalkWithNamesVm>();
|
|
CreateMap<RatingWithNames, RatingWithNamesVm>();
|
|
CreateMap<PublicWalkResponseWithNames, PublicWalkResponseWithNamesVm>();
|
|
CreateMap<WalkWithNames, WalkWithNamesListVm>();
|
|
|
|
CreateMap<AppVersionWithNames, AppVersionListVm>();
|
|
CreateMap<AppVersion, AppVersionVm>();
|
|
CreateMap<AppVersionVm, AppVersion>().ForMember(c => c.Created, d => d.Ignore()).ForMember(c => c.LastUpdate, d => d.Ignore()).ForMember(c => c.Version, d => d.Ignore());
|
|
|
|
CreateMap<ConversationWithNames, ConversationListVm>();
|
|
|
|
CreateMap<MessageCopy, MessageCopyVm>();
|
|
|
|
CreateMap<VoucherCampaign, VoucherCampaignVm>()
|
|
.ForMember(c => c.Lat, d => d.MapFrom(e => e.Location.Y))
|
|
.ForMember(c => c.Lng, d => d.MapFrom(e => e.Location.X));
|
|
CreateMap<VoucherCampaignVm, VoucherCampaign>()
|
|
.ForMember(c => c.Location, d => d.MapFrom(e => geometryFactory.CreatePoint(new Coordinate(e.Lng, e.Lat))))
|
|
.ForMember(c => c.VouchersUsed, d => d.Ignore())
|
|
.ForMember(c => c.BudgetUsed, d => d.Ignore())
|
|
.ForMember(c => c.EndDate, d => d.Ignore())
|
|
.ForMember(c => c.Created, d => d.Ignore());
|
|
CreateMap<VoucherCampaign, VoucherCampaignCrudVm>()
|
|
.ForMember(c => c.Lat, d => d.MapFrom(e => e.Location.Y))
|
|
.ForMember(c => c.Lng, d => d.MapFrom(e => e.Location.X));
|
|
CreateMap<VoucherCampaignCrudVm, VoucherCampaign>()
|
|
.ForMember(c => c.Location, d => d.MapFrom(e => geometryFactory.CreatePoint(new Coordinate(e.Lng, e.Lat))))
|
|
.ForMember(c => c.VouchersUsed, d => d.Ignore())
|
|
.ForMember(c => c.BudgetUsed, d => d.Ignore())
|
|
.ForMember(c => c.EndDate, d => d.Ignore())
|
|
.ForMember(c => c.Created, d => d.Ignore());
|
|
CreateMap<VoucherCampaignWithNames, VoucherCampaignListVm>();
|
|
|
|
CreateMap<SubscriptionWithNames, SubscriptionListVm>();
|
|
CreateMap<SubscriptionVm, Subscription>();
|
|
CreateMap<Subscription, SubscriptionVm>();
|
|
|
|
CreateMap<AppUserSubscriptionWithNames, SubscriptionBookingListVm>();
|
|
CreateMap<SubscriptionBookingCreateVm, AppUserSubscription>();
|
|
CreateMap<AppUserSubscription, SubscriptionBookingEditVm>();
|
|
CreateMap<SubscriptionBookingEditVm, AppUserSubscription>();
|
|
|
|
#region Dto
|
|
|
|
CreateMap<AppMode, AppModeDto>();
|
|
CreateMap<AppModeDto, AppMode>();
|
|
|
|
CreateMap<Sex, SexDto>();
|
|
CreateMap<SexDto, Sex>();
|
|
|
|
CreateMap<OnlineStatus, OnlineStatusDto>();
|
|
CreateMap<OnlineStatusDto, OnlineStatus>();
|
|
|
|
CreateMap<AppUserType, AppUserTypeDto>();
|
|
CreateMap<AppUserTypeDto, AppUserType>();
|
|
|
|
CreateMap<ListingType, ListingTypeDto>();
|
|
CreateMap<ListingTypeDto, ListingType>();
|
|
|
|
CreateMap<BannerStatus, BannerStatusDto>();
|
|
CreateMap<BannerStatusDto, BannerStatus>();
|
|
|
|
CreateMap<BannerSize, BannerSizeDto>();
|
|
CreateMap<BannerSizeDto, BannerSize>();
|
|
|
|
CreateMap<BannerLocation, BannerLocationDto>();
|
|
CreateMap<BannerLocationDto, BannerLocation>();
|
|
|
|
CreateMap<DogSex, DogSexDto>();
|
|
CreateMap<DogSexDto, DogSex>();
|
|
|
|
CreateMap<DogSize, DogSizeDto>();
|
|
CreateMap<DogSizeDto, DogSize>();
|
|
|
|
CreateMap<DogAggressionLevel, DogAggressionLevelDto>();
|
|
CreateMap<DogAggressionLevelDto, DogAggressionLevel>();
|
|
|
|
CreateMap<DogFeedingTimes, DogFeedingTimesDto>();
|
|
CreateMap<DogFeedingTimesDto, DogFeedingTimes>();
|
|
|
|
CreateMap<DogWalkRequestType, DogWalkRequestTypeDto>();
|
|
CreateMap<DogWalkRequestTypeDto, DogWalkRequestType>();
|
|
|
|
CreateMap<PublicWalkRequestType, PublicWalkRequestTypeDto>();
|
|
CreateMap<PublicWalkRequestTypeDto, PublicWalkRequestType>();
|
|
|
|
CreateMap<PublicWalkRequestStatus, PublicWalkRequestStatusDto>();
|
|
CreateMap<PublicWalkRequestStatusDto, PublicWalkRequestStatus>();
|
|
|
|
CreateMap<PublicWalkResponseStatus, PublicWalkResponseStatusDto>();
|
|
CreateMap<PublicWalkResponseStatusDto, PublicWalkResponseStatus>();
|
|
|
|
CreateMap<WalkType, WalkTypeDto>();
|
|
CreateMap<WalkTypeDto, WalkType>();
|
|
|
|
CreateMap<WalkServiceType, WalkServiceTypeDto>();
|
|
CreateMap<WalkServiceTypeDto, WalkServiceType>();
|
|
|
|
CreateMap<WalkStatus, WalkStatusDto>();
|
|
CreateMap<WalkStatusDto, WalkStatus>();
|
|
|
|
CreateMap<CancellationSource, CancellationSourceDto>();
|
|
CreateMap<CancellationSourceDto, CancellationSource>();
|
|
|
|
CreateMap<PaymentStatus, PaymentStatusDto>();
|
|
CreateMap<PaymentStatusDto, PaymentStatus>();
|
|
|
|
CreateMap<RatingTarget, RatingTargetDto>();
|
|
CreateMap<RatingTargetDto, RatingTarget>();
|
|
|
|
CreateMap<SortDirection, SortDirectionDto>();
|
|
CreateMap<SortDirectionDto, SortDirection>();
|
|
|
|
CreateMap<AppFeedbackType, AppFeedbackTypeDto>();
|
|
CreateMap<AppFeedbackTypeDto, AppFeedbackType>();
|
|
|
|
CreateMap<AppFeedbackStatus, AppFeedbackStatusDto>();
|
|
CreateMap<AppFeedbackStatusDto, AppFeedbackStatus>();
|
|
|
|
CreateMap<SystemMessageType, SystemMessageTypeDto>();
|
|
CreateMap<SystemMessageTypeDto, SystemMessageType>();
|
|
|
|
CreateMap<NotificationPlatform, NotificationPlatformDto>();
|
|
CreateMap<NotificationPlatformDto, NotificationPlatform>();
|
|
|
|
CreateMap<Platform, PlatformDto>();
|
|
CreateMap<PlatformDto, Platform>();
|
|
|
|
CreateMap<WalletType, WalletTypeDto>();
|
|
CreateMap<WalletTypeDto, WalletType>();
|
|
|
|
CreateMap<PayInType, PayInTypeDto>();
|
|
CreateMap<PayInTypeDto, PayInType>();
|
|
|
|
CreateMap<IdentityDocumentSource, IdentityDocumentSourceDto>();
|
|
CreateMap<IdentityDocumentSourceDto, IdentityDocumentSource>();
|
|
|
|
CreateMap<IdentityDocumentType, IdentityDocumentTypeDto>();
|
|
CreateMap<IdentityDocumentTypeDto, IdentityDocumentType>();
|
|
|
|
CreateMap<IdentityDocumentStatus, IdentityDocumentStatusDto>();
|
|
CreateMap<IdentityDocumentStatusDto, IdentityDocumentStatus>();
|
|
|
|
CreateMap<PaymentTransactionStatus, PaymentTransactionStatusDto>();
|
|
CreateMap<PaymentTransactionStatusDto, PaymentTransactionStatus>();
|
|
|
|
CreateMap<WalkComplaintSource, WalkComplaintSourceDto>();
|
|
CreateMap<WalkComplaintSourceDto, WalkComplaintSource>();
|
|
|
|
CreateMap<WalkComplaintStatus, WalkComplaintStatusDto>();
|
|
CreateMap<WalkComplaintStatusDto, WalkComplaintStatus>();
|
|
|
|
CreateMap<WalkComplaintType, WalkComplaintTypeDto>();
|
|
CreateMap<WalkComplaintTypeDto, WalkComplaintType>();
|
|
|
|
CreateMap<CardType, CardTypeDto>();
|
|
CreateMap<CardTypeDto, CardType>();
|
|
|
|
CreateMap<Validity, ValidityDto>();
|
|
CreateMap<ValidityDto, Validity>();
|
|
|
|
CreateMap<AppUserReportSection, AppUserReportSectionDto>();
|
|
CreateMap<AppUserReportSectionDto, AppUserReportSection>();
|
|
|
|
CreateMap<AppUserReportType, AppUserReportTypeDto>();
|
|
CreateMap<AppUserReportTypeDto, AppUserReportType>();
|
|
|
|
CreateMap<AppUserReportBlockType, AppUserReportBlockTypeDto>();
|
|
CreateMap<AppUserReportBlockTypeDto, AppUserReportBlockType>();
|
|
|
|
CreateMap<VoucherCampaignType, VoucherCampaignTypeDto>();
|
|
CreateMap<VoucherCampaignTypeDto, VoucherCampaignType>();
|
|
|
|
CreateMap<VoucherValidationResult, VoucherValidationResultDto>();
|
|
CreateMap<VoucherValidationResultDto, VoucherValidationResult>();
|
|
|
|
CreateMap<SubscriptionLength, SubscriptionLengthDto>();
|
|
CreateMap<SubscriptionLengthDto, SubscriptionLength>();
|
|
|
|
CreateMap<DynamicSortOrder, DynamicSortOrderDto>();
|
|
CreateMap<DynamicSortOrderDto, DynamicSortOrder>();
|
|
|
|
CreateMap<ContactMin, ContactMinDto>();
|
|
CreateMap<ContactMinDto, ContactMin>();
|
|
|
|
CreateMap<Address, AddressDto>();
|
|
CreateMap<AddressDto, Address>();
|
|
|
|
CreateMap<SocialMedia, SocialMediaDto>();
|
|
CreateMap<SocialMediaDto, SocialMedia>();
|
|
|
|
CreateMap<ApplicationUser, UserDto>();
|
|
CreateMap<AppUser, AppUserDto>()
|
|
.ForMember(c => c.Lat, d => d.MapFrom(e => e.Location.Y))
|
|
.ForMember(c => c.Lng, d => d.MapFrom(e => e.Location.X));
|
|
CreateMap<ApplicationUser, WebsiteApiUserDto>();
|
|
|
|
CreateMap<RefreshToken, RefreshTokenDto>();
|
|
|
|
CreateMap<NewsCategory, NewsCategoryDto>();
|
|
CreateMap<NewsCategoryWithNames, NewsCategoryDto>();
|
|
CreateMap<NewsWithNames, NewsDto>();
|
|
|
|
CreateMap<AppUserDto, AppUser>()
|
|
.ForMember(c => c.Created, d => d.Ignore())
|
|
.ForMember(c => c.Comment, d => d.Ignore())
|
|
.ForMember(c => c.Locked, d => d.Ignore())
|
|
.ForMember(c => c.LockedReason, d => d.Ignore())
|
|
.ForMember(c => c.LockedUntil, d => d.Ignore())
|
|
.ForMember(c => c.LockedCount, d => d.Ignore())
|
|
.ForMember(c => c.RatingStatistics, d => d.Ignore())
|
|
.ForMember(c => c.RatingStatisticsWalker, d => d.Ignore())
|
|
.ForMember(c => c.PaymentId, d => d.Ignore())
|
|
.ForMember(c => c.KycPassed, d => d.Ignore())
|
|
.ForMember(c => c.KycPassedDate, d => d.Ignore())
|
|
.ForMember(c => c.BankId, d => d.Ignore())
|
|
.ForMember(c => c.Verified, d => d.Ignore())
|
|
.ForMember(c => c.VerifiedDate, d => d.Ignore())
|
|
.ForPath(c => c.Location.Y, d => d.MapFrom(e => e.Lat))
|
|
.ForPath(c => c.Location.X, d => d.MapFrom(e => e.Lng))
|
|
.ForMember(c => c.Anonymized, d => d.Ignore())
|
|
.ForMember(c => c.AnonymizedDate, d => d.Ignore());
|
|
|
|
CreateMap<AppUser, AppUserLookupDto>()
|
|
.ForMember(c => c.LocationHint, d => d.MapFrom(e => $"{e.Address.City}"))
|
|
.ForMember(c => c.Lat, d => d.MapFrom(e => e.Location.Y))
|
|
.ForMember(c => c.Lng, d => d.MapFrom(e => e.Location.X));
|
|
//.ForMember(c => c.LocationHint, d => d.MapFrom(e => $"{e.Address.City}, {e.Address.CountryCode}"))
|
|
|
|
CreateMap<Conversation, ConversationDto>();
|
|
CreateMap<ConversationWithNames, ConversationDto>();
|
|
|
|
CreateMap<AppUserBlock, AppUserBlockDto>();
|
|
CreateMap<AppUserBlockDto, AppUserBlock>();
|
|
|
|
CreateMap<AppUserBlockWithNames, AppUserBlockWithNamesDto>()
|
|
.ForMember(c => c.Lat, d => d.MapFrom(e => e.Location.Y))
|
|
.ForMember(c => c.Lng, d => d.MapFrom(e => e.Location.X));
|
|
|
|
CreateMap<Message, MessageDto>();
|
|
CreateMap<MessageDto, Message>();
|
|
|
|
CreateMap<DogWalker, DogWalkerLookupDto>()
|
|
.ForMember(c => c.Lat, d => d.MapFrom(e => e.Location.Y))
|
|
.ForMember(c => c.Lng, d => d.MapFrom(e => e.Location.X))
|
|
.ForMember(c => c.City, d => d.MapFrom(e => e.Address_City))
|
|
.ForMember(c => c.AverageRating, d => d.MapFrom(e => e.RatingStatisticsWalker_AverageRating))
|
|
.ForMember(c => c.TotalRatings, d => d.MapFrom(e => e.RatingStatisticsWalker_TotalRatings));
|
|
|
|
CreateMap<DogWalker, DogWalkerInfoDto>()
|
|
.ForMember(c => c.Lat, d => d.MapFrom(e => e.Location.Y))
|
|
.ForMember(c => c.Lng, d => d.MapFrom(e => e.Location.X))
|
|
.ForPath(c => c.Contact.Email, d => d.MapFrom(e => e.Contact_Email))
|
|
.ForPath(c => c.Contact.Mobile, d => d.MapFrom(e => e.Contact_Mobile))
|
|
.ForPath(c => c.Contact.Phone, d => d.MapFrom(e => e.Contact_Phone))
|
|
.ForPath(c => c.Address.AddressLine1, d => d.MapFrom(e => e.Address_AddressLine1))
|
|
.ForPath(c => c.Address.AddressLine2, d => d.MapFrom(e => e.Address_AddressLine2))
|
|
.ForPath(c => c.Address.Zip, d => d.MapFrom(e => e.Address_Zip))
|
|
.ForPath(c => c.Address.City, d => d.MapFrom(e => e.Address_City))
|
|
.ForPath(c => c.Address.State, d => d.MapFrom(e => e.Address_State))
|
|
.ForPath(c => c.Address.CountryCode, d => d.MapFrom(e => e.Address_CountryCode))
|
|
.ForPath(c => c.RatingStatistics.AverageRating, d => d.MapFrom(e => e.RatingStatistics_AverageRating))
|
|
.ForPath(c => c.RatingStatistics.TotalPoints, d => d.MapFrom(e => e.RatingStatistics_TotalPoints))
|
|
.ForPath(c => c.RatingStatistics.TotalRatings, d => d.MapFrom(e => e.RatingStatistics_TotalRatings))
|
|
.ForPath(c => c.RatingStatisticsWalker.AverageRating, d => d.MapFrom(e => e.RatingStatisticsWalker_AverageRating))
|
|
.ForPath(c => c.RatingStatisticsWalker.TotalPoints, d => d.MapFrom(e => e.RatingStatisticsWalker_TotalPoints))
|
|
.ForPath(c => c.RatingStatisticsWalker.TotalRatings, d => d.MapFrom(e => e.RatingStatisticsWalker_TotalRatings));
|
|
|
|
CreateMap<AppUser, DogOwnerInfoDto>()
|
|
.ForMember(c => c.Lat, d => d.MapFrom(e => e.Location.Y))
|
|
.ForMember(c => c.Lng, d => d.MapFrom(e => e.Location.X))
|
|
.ForMember(c => c.Contact, d => d.MapFrom(e => e.Contact))
|
|
.ForMember(c => c.Address, d => d.MapFrom(e => e.Address))
|
|
.ForMember(c => c.RatingStatistics, d => d.MapFrom(e => e.RatingStatistics));
|
|
|
|
CreateMap<ListingWithNames, ListingDto>()
|
|
.ForPath(c => c.ListingAddress.AddressLine1, d => d.MapFrom(e => e.ListingAddress_AddressLine1))
|
|
.ForPath(c => c.ListingAddress.AddressLine2, d => d.MapFrom(e => e.ListingAddress_AddressLine2))
|
|
.ForPath(c => c.ListingAddress.Zip, d => d.MapFrom(e => e.ListingAddress_Zip))
|
|
.ForPath(c => c.ListingAddress.City, d => d.MapFrom(e => e.ListingAddress_City))
|
|
.ForPath(c => c.ListingAddress.State, d => d.MapFrom(e => e.ListingAddress_State))
|
|
.ForPath(c => c.ListingAddress.CountryCode, d => d.MapFrom(e => e.ListingAddress_CountryCode))
|
|
.ForMember(c => c.ListingLat, d => d.MapFrom(e => e.ListingLocation.Y))
|
|
.ForMember(c => c.ListingLng, d => d.MapFrom(e => e.ListingLocation.X));
|
|
|
|
CreateMap<BranchWithNames, BranchDto>();
|
|
CreateMap<BranchWithNames, BranchWithListingsDto>();
|
|
|
|
CreateMap<BannerWithNames, BannerDto>();
|
|
|
|
CreateMap<AdvertisementWithNames, AdvertisementDto>();
|
|
CreateMap<AdvertisementCategoryWithNames, AdvertisementCategoryDto>();
|
|
|
|
CreateMap<DogRaceWithNames, DogRaceDto>();
|
|
|
|
CreateMap<Dog, DogDto>();
|
|
CreateMap<DogDto, Dog>().ForMember(c => c.RatingStatistics, d => d.Ignore());
|
|
CreateMap<DogMinInfo, DogMinInfoDto>();
|
|
CreateMap<DogWithNames, DogMinInfoDto>()
|
|
.ForMember(c => c.AverageRating, d => d.MapFrom(e => e.RatingStatistics_AverageRating))
|
|
.ForMember(c => c.TotalRatings, d => d.MapFrom(e => e.RatingStatistics_TotalRatings));
|
|
|
|
CreateMap<RatingStatistics, RatingStatisticsDto>();
|
|
CreateMap<RatingStatisticsDto, RatingStatistics>();
|
|
|
|
CreateMap<DogWalkerProfile, DogWalkerProfileDto>();
|
|
CreateMap<DogWalkerProfileDto, DogWalkerProfile>();
|
|
|
|
CreateMap<PublicWalkRequest, PublicWalkRequestDto>()
|
|
.ForMember(c => c.Lat, d => d.MapFrom(e => e.Location.Y))
|
|
.ForMember(c => c.Lng, d => d.MapFrom(e => e.Location.X));
|
|
CreateMap<PublicWalkRequestDto, PublicWalkRequest>()
|
|
.ForPath(c => c.Location.Y, d => d.MapFrom(e => e.Lat))
|
|
.ForPath(c => c.Location.X, d => d.MapFrom(e => e.Lng));
|
|
CreateMap<PublicWalkRequestCreateDto, PublicWalkRequest>();
|
|
CreateMap<PublicWalkRequestWithNames, PublicWalkRequestWithNamesDto>()
|
|
.ForMember(c => c.Lat, d => d.MapFrom(e => e.Location.Y))
|
|
.ForMember(c => c.Lng, d => d.MapFrom(e => e.Location.X));
|
|
CreateMap<PublicWalkRequestWithNamesAndResponseStatus, PublicWalkRequestWithNamesAndResponseStatusDto>()
|
|
.ForMember(c => c.Lat, d => d.MapFrom(e => e.Location.Y))
|
|
.ForMember(c => c.Lng, d => d.MapFrom(e => e.Location.X));
|
|
|
|
CreateMap<PublicWalkResponse, PublicWalkResponseDto>();
|
|
CreateMap<PublicWalkResponseDto, PublicWalkResponse>();
|
|
CreateMap<PublicWalkResponseWithNames, PublicWalkResponseWithNamesDto>();
|
|
|
|
CreateMap<Walk, WalkDto>()
|
|
.ForMember(c => c.PickupAddressLat, d => d.MapFrom(e => e.PickupLocation.Y))
|
|
.ForMember(c => c.PickupAddressLng, d => d.MapFrom(e => e.PickupLocation.X))
|
|
.ForMember(c => c.ReturnAddressLat, d => d.MapFrom(e => e.ReturnLocation.Y))
|
|
.ForMember(c => c.ReturnAddressLng, d => d.MapFrom(e => e.ReturnLocation.X));
|
|
CreateMap<WalkDto, Walk>()
|
|
.ForPath(c => c.PickupLocation.Y, d => d.MapFrom(e => e.PickupAddressLat))
|
|
.ForPath(c => c.PickupLocation.X, d => d.MapFrom(e => e.PickupAddressLng))
|
|
.ForPath(c => c.ReturnLocation.Y, d => d.MapFrom(e => e.ReturnAddressLat))
|
|
.ForPath(c => c.ReturnLocation.X, d => d.MapFrom(e => e.ReturnAddressLng));
|
|
|
|
CreateMap<WalkWithNames, WalkWithNamesDto>()
|
|
.ForPath(c => c.PickupAddress.AddressLine1, d => d.MapFrom(e => e.PickupAddress_AddressLine1))
|
|
.ForPath(c => c.PickupAddress.AddressLine2, d => d.MapFrom(e => e.PickupAddress_AddressLine2))
|
|
.ForPath(c => c.PickupAddress.Zip, d => d.MapFrom(e => e.PickupAddress_Zip))
|
|
.ForPath(c => c.PickupAddress.City, d => d.MapFrom(e => e.PickupAddress_City))
|
|
.ForPath(c => c.PickupAddress.State, d => d.MapFrom(e => e.PickupAddress_State))
|
|
.ForPath(c => c.PickupAddress.CountryCode, d => d.MapFrom(e => e.PickupAddress_CountryCode))
|
|
.ForMember(c => c.PickupAddressLat, d => d.MapFrom(e => e.PickupLocation.Y))
|
|
.ForMember(c => c.PickupAddressLng, d => d.MapFrom(e => e.PickupLocation.X))
|
|
.ForPath(c => c.ReturnAddress.AddressLine1, d => d.MapFrom(e => e.ReturnAddress_AddressLine1))
|
|
.ForPath(c => c.ReturnAddress.AddressLine2, d => d.MapFrom(e => e.ReturnAddress_AddressLine2))
|
|
.ForPath(c => c.ReturnAddress.Zip, d => d.MapFrom(e => e.ReturnAddress_Zip))
|
|
.ForPath(c => c.ReturnAddress.City, d => d.MapFrom(e => e.ReturnAddress_City))
|
|
.ForPath(c => c.ReturnAddress.State, d => d.MapFrom(e => e.ReturnAddress_State))
|
|
.ForPath(c => c.ReturnAddress.CountryCode, d => d.MapFrom(e => e.ReturnAddress_CountryCode))
|
|
.ForMember(c => c.ReturnAddressLat, d => d.MapFrom(e => e.ReturnLocation.Y))
|
|
.ForMember(c => c.ReturnAddressLng, d => d.MapFrom(e => e.ReturnLocation.X));
|
|
|
|
CreateMap<WalkingTime, WalkingTimeDto>();
|
|
CreateMap<WalkingTimeDto, WalkingTime>();
|
|
|
|
CreateMap<Rating, RatingDto>();
|
|
CreateMap<RatingDto, Rating>();
|
|
CreateMap<RatingWithNames, RatingWithNamesDto>();
|
|
CreateMap<RatingWithNamesEx, RatingWithNamesDto>();
|
|
|
|
CreateMap<AppFeedback, AppFeedbackDto>();
|
|
CreateMap<AppFeedbackDto, AppFeedback>();
|
|
CreateMap<AppFeedbackCreateDto, AppFeedback>();
|
|
|
|
CreateMap<Favourite, FavouriteDto>();
|
|
CreateMap<FavouriteDto, Favourite>();
|
|
|
|
CreateMap<SystemMessage, SystemMessageDto>();
|
|
CreateMap<SystemMessageDto, SystemMessage>();
|
|
|
|
CreateMap<SystemMessageToSend, SystemMessageToSendVm>();
|
|
CreateMap<SystemMessageToSendVm, SystemMessageToSend>()
|
|
.ForMember(c => c.HasBeenSent, d => d.Ignore());
|
|
CreateMap<SystemMessageToSend, SystemMessageToSendCrudVm>();
|
|
CreateMap<SystemMessageToSendCrudVm, SystemMessageToSend>()
|
|
.ForMember(c => c.HasBeenSent, d => d.Ignore()); ;
|
|
CreateMap<SystemMessageToSend, SystemMessageToSendListVm>();
|
|
|
|
CreateMap<DeviceInstallationDto, DeviceInstallation>();
|
|
|
|
CreateMap<BankAccount, BankAccountDto>();
|
|
CreateMap<BankAccountDto, BankAccount>();
|
|
|
|
CreateMap<Wallet, WalletDto>();
|
|
CreateMap<WalletDto, Wallet>();
|
|
|
|
CreateMap<TransactionFee, TransactionFeeDto>();
|
|
CreateMap<TransactionFeeDto, TransactionFee>();
|
|
|
|
CreateMap<IdentityDocument, IdentityDocumentDto>();
|
|
CreateMap<IdentityDocumentDto, IdentityDocument>();
|
|
|
|
CreateMap<Payout, PayoutDto>();
|
|
CreateMap<PayoutDto, Payout>();
|
|
|
|
CreateMap<WalkComplaint, WalkComplaintDto>();
|
|
CreateMap<WalkComplaintDto, WalkComplaint>();
|
|
|
|
CreateMap<Card, CardDto>();
|
|
CreateMap<CardDto, Card>();
|
|
|
|
CreateMap<AppUserReportDto, AppUserReport>();
|
|
|
|
CreateMap<AppVersionWithNames, AppVersionDto>();
|
|
CreateMap<AppVersionWithNames, AppVersionCheckDto>();
|
|
|
|
CreateMap<SubscriptionWithNames, SubscriptionDto>();
|
|
CreateMap<AppUserSubscriptionWithNames, AppUserSubscriptionDto>();
|
|
|
|
#endregion
|
|
}
|
|
}
|
|
}
|