Skip to content

Commit

Permalink
fix(schema): add email field to TripSchema and remove account from Ne…
Browse files Browse the repository at this point in the history
…wTripInputSchema
  • Loading branch information
KimBlazter committed Jan 25, 2025
1 parent 602f26f commit c71501f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/db/src/schemas/trips.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ export const TripSchema = z.object({
price: z.number().min(0),
createdAt: z.string().optional().nullable(),
updatedAt: z.string().optional().nullable(),
account: z.any().optional()
account: z.any().optional(),
email: z.string().email()
})

export type Trip = z.infer<typeof TripSchema>
Expand All @@ -43,8 +44,7 @@ export const NewTripInputSchema = z.object({
from: z.string().min(1),
to: z.string().min(1),
departure: z.date(),
price: z.number().min(0),
account: z.any().optional()
price: z.number().min(0)
})

export type NewTripInput = z.infer<typeof NewTripInputSchema>

0 comments on commit c71501f

Please sign in to comment.