feat(GRO-1427): add buffer rules CRUD — enums, table, routes
Re-implement lost commit from worktree cleanup. PR #12 already has UAT_PLAYBOOK + factories fix; add all missing core implementation: - Add petSizeCategoryEnum/coatTypeEnum to schema - Add bufferRules table with service FK + unique constraint - Add defaultBufferMinutes column to services table - Change pets.coatType/petSizeCategory text columns to use enums - Add routes/buffer-rules.ts: GET/POST/PATCH/DELETE, manager role guard - Register /api/buffer-rules in index.ts - Update services.ts PATCH to accept defaultBufferMinutes - Update pets.ts POST/PATCH to accept sizeCategory/coatType - Cast coatType/petSizeCategory in book.ts insert to match new enums - Add 0031_buffer_rules.sql migration - Fix factories.ts buildService to include defaultBufferMinutes: null Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,7 @@ const createServiceSchema = z.object({
|
||||
description: z.string().max(2000).optional(),
|
||||
basePriceCents: z.number().int().positive(),
|
||||
durationMinutes: z.number().int().positive().max(480),
|
||||
defaultBufferMinutes: z.number().int().min(0).optional(),
|
||||
active: z.boolean().default(true),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user