feat(api): add bookings CRUD and payment endpoints

- Add bookings list/create API with filters (siteId, date, status)
- Add booking detail, update, and delete endpoints
- Add payment processing endpoint with transaction support
- Add clients list/search and create API
- Implement membership discounts (free hours and percentage)
- Validate requests with Zod schemas from shared package
- Include Spanish error messages

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Ivan
2026-02-01 06:44:54 +00:00
parent d3413c727f
commit ef21748191
6 changed files with 3209 additions and 1 deletions

View File

@@ -13,6 +13,7 @@
"db:studio": "prisma studio"
},
"dependencies": {
"@padel-pro/shared": "*",
"@prisma/client": "^5.10.0",
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-dropdown-menu": "^2.0.6",
@@ -29,7 +30,8 @@
"next-auth": "^4.24.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"tailwind-merge": "^2.2.0"
"tailwind-merge": "^2.2.0",
"zod": "^3.22.4"
},
"devDependencies": {
"@types/bcryptjs": "^2.4.6",