using Tiku.Application.Commerce;
using Tiku.Domain.Commerce;
using Tiku.Infrastructure.Persistence;
namespace Tiku.Infrastructure.Commerce;

internal sealed record CommerceServiceDependencies(
    ICommercePersistence CommercePersistence,
    ICatalogPersistence CatalogPersistence,
    IIdentityPersistence IdentityPersistence,
    IPaymentProviderGateway PaymentGateway);

internal abstract partial class CommerceServiceBase(CommerceServiceDependencies dependencies)
{
    protected ICommercePersistence commercePersistence { get; } = dependencies.CommercePersistence;
    protected ICatalogPersistence catalogPersistence { get; } = dependencies.CatalogPersistence;
    protected IIdentityPersistence identityPersistence { get; } = dependencies.IdentityPersistence;
    protected IPaymentProviderGateway paymentGateway { get; } = dependencies.PaymentGateway;
    protected sealed record CouponApplication(Coupon Coupon, CouponRedemption Redemption, int DiscountCents);
}
