using CMSMicroservice.Application.UserCartsCQ.Queries.GetAllUserCartsByFilter;

namespace CMSMicroservice.Application.Common.Mappings;

public class UserCartsProfile : IRegister
{
    void IRegister.Register(TypeAdapterConfig config)
    {
        config.NewConfig<UserCart,GetAllUserCartsByFilterResponseModel>()
            .Map(dest => dest.Id, src => src.Id)
            .Map(dest => dest.Count, src => src.Count)
            .Map(dest => dest.ProductId, src => src.ProductId)
            .Map(dest => dest.ProductTitle, src => src.Product.Title)
            .Map(dest => dest.ProductShortInfomation, src => src.Product.ShortInfomation)
            .Map(dest => dest.ProductDiscount, src => src.Product.Discount)
            .Map(dest => dest.ProductPrice, src => src.Product.Price)
            .Map(dest => dest.ProductThumbnailPath, src => src.Product.ThumbnailPath)
            .Map(dest => dest.Created, src => src.Created)
            ;
    }
}
