feat(F-138): completed feature

This commit is contained in:
chattie
2026-08-22 10:18:37 +02:00
parent 5098723284
commit fb015932b2
23 changed files with 502 additions and 102 deletions

View File

@@ -9,9 +9,16 @@ export interface PricingService {
calculate(input: PriceCalculationCommand): Promise<PriceCalculation>;
getVariantPrice(variantId: string): Promise<VariantPrice | undefined>;
setVariantPrice(input: SetVariantPriceCommand): Promise<VariantPrice>;
/**
* Seeds a neutral default price row for a freshly created variant so that
* GET /pricing/variants/:id never 404s right after creation (F-138). Idempotent:
* no-op when a row already exists for the given variant_id.
*/
seedVariantPrice(variantId: string): Promise<void>;
}
export interface PricingRepository {
findByVariantId(variantId: string): Promise<VariantPrice | undefined>;
setVariantPrice(input: SetVariantPriceCommand): Promise<VariantPrice>;
seedVariantPrice(variantId: string): Promise<void>;
}