feat(purchase): add per-purchase participant splits

This commit is contained in:
2026-03-11 14:34:27 +04:00
parent 98988159eb
commit 8401688032
26 changed files with 5050 additions and 114 deletions

View File

@@ -35,6 +35,13 @@ export interface FinanceParsedPurchaseRecord {
currency: CurrencyCode
description: string | null
occurredAt: Instant | null
splitMode?: 'equal' | 'custom_amounts'
participants?: readonly {
id?: string
memberId: string
included?: boolean
shareAmountMinor: bigint | null
}[]
}
export interface FinanceUtilityBillRecord {
@@ -170,6 +177,12 @@ export interface FinanceRepository {
amountMinor: bigint
currency: CurrencyCode
description: string | null
splitMode?: 'equal' | 'custom_amounts'
participants?: readonly {
memberId: string
included?: boolean
shareAmountMinor: bigint | null
}[]
}): Promise<FinanceParsedPurchaseRecord | null>
deleteParsedPurchase(purchaseId: string): Promise<boolean>
updateUtilityBill(input: {