Files
splitt-the-bill/app/types.ts
T
anbraten cbe1b42f6e
tinyedge/deploy Deployed by TinyEdge
🐛 add env to useDb and apply prettier
2026-08-07 13:28:26 +02:00

32 lines
645 B
TypeScript

export interface ParticipantView {
id: number;
name: string;
paymentLink: string | null;
}
export type ExpenseType = 'expense' | 'payment';
export interface ExpenseView {
id: number;
type: ExpenseType;
description: string;
amountCents: number;
payerId: number;
participantIds: number[];
createdAt: number;
}
export interface SettlementView {
fromId: number;
toId: number;
amountCents: number;
}
export interface PotView {
pot: { slug: string; name: string; currency: string };
participants: ParticipantView[];
expenses: ExpenseView[];
netBalances: Record<number, number>;
settlements: SettlementView[];
}