feat(GRO-1174): persist petSizeCategory and petCoatType from booking
- Add petSizeCategory and petCoatType to bookingSchema zod validator (optional) - Save coatType to pets row on booking creation - Add coatType and petSizeCategory columns to pets DB schema - Add coatType and petSizeCategory to Pet interface in @groombook/types Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -112,6 +112,8 @@ const bookingSchema = z.object({
|
||||
petName: z.string().min(1).max(200),
|
||||
petSpecies: z.string().min(1).max(100),
|
||||
petBreed: z.string().max(100).optional(),
|
||||
petSizeCategory: z.string().max(50).optional(),
|
||||
petCoatType: z.string().max(50).optional(),
|
||||
notes: z.string().max(2000).optional(),
|
||||
});
|
||||
|
||||
@@ -191,6 +193,7 @@ bookRouter.post(
|
||||
name: body.petName,
|
||||
species: body.petSpecies,
|
||||
breed: body.petBreed ?? null,
|
||||
coatType: body.petCoatType ?? null,
|
||||
})
|
||||
.returning();
|
||||
const pet = petInserted[0];
|
||||
|
||||
Reference in New Issue
Block a user