Refactor patch test system and add booking edit requests

- Replace patch_test_duration_hours on services with separate
  patch_tests table
- Add user_patch_tests table to track user patch test records
- Add booking edit request system: users can request time changes
- Add admin handlers to list, approve, and reject edit requests
- Add validation to prevent editing completed/cancelled bookings
- Add overlap and closed-day checks for booking edits
This commit is contained in:
2026-02-24 17:23:28 +00:00
parent 89d848ee72
commit f59595eeec
11 changed files with 906 additions and 255 deletions
+5 -2
View File
@@ -76,7 +76,9 @@ func Migrate(t *testing.T, pool *pgxpool.Pool) {
"booking_services",
"payments",
"bookings",
"user_service_patch_tests",
"user_patch_tests",
"patch_tests",
"booking_edit_requests",
"services",
"verification_codes",
"user_social_logins",
@@ -196,7 +198,8 @@ func TruncateTables(t *testing.T, pool *pgxpool.Pool) {
"booking_services",
"payments",
"bookings",
"user_service_patch_tests",
"user_patch_tests",
"patch_tests",
"services",
"admin_notifications",
"user_referrals",