feat(F-138): completed feature
This commit is contained in:
@@ -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>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user