Fix: Update permission names, models and constants

Permission renames:
- BOOK_APPOINTMENT -> CREATE_EXCHANGE
- VIEW_OWN_APPOINTMENTS -> VIEW_OWN_EXCHANGES
- CANCEL_OWN_APPOINTMENT -> CANCEL_OWN_EXCHANGE
- VIEW_ALL_APPOINTMENTS -> VIEW_ALL_EXCHANGES
- CANCEL_ANY_APPOINTMENT -> CANCEL_ANY_EXCHANGE
- Add COMPLETE_EXCHANGE permission

Model changes:
- Delete AppointmentStatus enum
- Delete Appointment model

Schema changes:
- Delete BookingRequest (was for old booking)
- Delete AppointmentResponse, PaginatedAppointments
- Delete BookableSlot, AvailableSlotsResponse (unused)

Constants changes:
- Remove appointmentStatuses from shared/constants.json
- Merge booking constants into exchange section
- Update shared_constants.py and validate_constants.py
This commit is contained in:
counterweight 2025-12-22 20:28:21 +01:00
parent 743129b11d
commit fa07490b7b
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
6 changed files with 32 additions and 147 deletions

View file

@ -8,11 +8,6 @@
"SPENT": "spent",
"REVOKED": "revoked"
},
"appointmentStatuses": {
"BOOKED": "booked",
"CANCELLED_BY_USER": "cancelled_by_user",
"CANCELLED_BY_ADMIN": "cancelled_by_admin"
},
"exchangeStatuses": {
"BOOKED": "booked",
"COMPLETED": "completed",
@ -24,13 +19,10 @@
"BUY": "buy",
"SELL": "sell"
},
"booking": {
"exchange": {
"slotDurationMinutes": 15,
"maxAdvanceDays": 30,
"minAdvanceDays": 1,
"noteMaxLength": 144
},
"exchange": {
"eurTradeMin": 100,
"eurTradeMax": 3000,
"eurTradeIncrement": 20,