interface Modifier

An owner-defined price modifier (surcharge / discount / add-on). calc_value is the positive magnitude the owner entered (a fixed amount in major currency units, a percentage, or a multiplier); direction chooses charge vs discount.

Properties

active: boolean
calc_kind: CalcKind
calc_value: number
code: string

Promo code (trigger = "code"), shown to the owner; "" for other triggers.

code_index: string | null

Blind index (HMAC) of the normalised code, for public code lookup; null when the modifier has no code.

direction: ModifierDirection
id: number

Minimum in-scope subtotal (minor units) for the modifier to apply.

min_visits: number

Minimum prior bookings required for the modifier to apply.

name: string
scope: ModifierScope
stock: number | null

Remaining-stock cap, or null for unlimited. Consumed monotonically.

Projected from the transfers ledger as balanceOf(modifier:M) — the modifier account's net effect on revenue (surcharges in, discounts out), read directly, in minor units.

total_uses: number

Trigger-maintained SUM(quantity) over this modifier's usage rows.

trigger: ModifierTrigger

Trigger-maintained COUNT of this modifier's usage rows.