18 lines
431 B
TypeScript
18 lines
431 B
TypeScript
import { z } from "zod";
|
|
|
|
export const expenseSchema = z.object({
|
|
amount: z.number().min(0.01),
|
|
description: z.string().optional(),
|
|
friendId: z.string().optional(),
|
|
groupId: z.string().optional(),
|
|
});
|
|
|
|
export const expenseSplitSchema = z.object({
|
|
expenseId: z.string(),
|
|
groupId: z.string().optional(),
|
|
paidById: z.string().min(1),
|
|
owedById: z.string().min(1),
|
|
amount: z.number().min(1),
|
|
status: z.string(),
|
|
});
|