adityanandanx / adityanandanx/raftaar
3. Station & Bike Inventory Management
- Langage dominant
- Python
- Étoiles
- 0
- Forks
- 0
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
## Parent PRD
#1
## What to build
Admin-only endpoints to manage bike stations and inventory. Admins should be able to create stations, add bikes to stations, mark bikes for maintenance, retire bikes, and view the status of all bikes and stations.
Implements database schema for stations and bikes with proper status tracking, capacity constraints, and maintenance tracking.
## Acceptance criteria
- [ ] `POST /admin/stations` creates station with name, latitude, longitude, capacity (admin only)
- [ ] `GET /admin/stations` lists all stations with current bike count (admin only)
- [ ] `POST /admin/bikes` adds bike to station with QR code hash, model (admin only)
- [ ] `PUT /admin/bikes/:id` updates bike status (available, maintenance, retired) (admin only)
- [ ] `GET /admin/bikes` lists all bikes with status and station (admin only)
- [ ] `GET /admin/bikes/low-availability` returns stations sorted by available bike count (admin only)
- [ ] Bike cannot be reserved/rented if status != 'available'
- [ ] Station cannot exceed capacity (no more bikes than capacity)
- [ ] Database schema: `stations` (id, name, latitude, longitude, capacity), `bikes` (id, station_id, qr_code_hash, status, model, last_maintenance)
- [ ] Only users with role='admin' can access these endpoints
## Blocked by
- Blocked by #2 (Project Setup)
## User stories addressed
- User story 27: Create new stations
- User story 28: Add bikes to stations
- User story 29: Mark bikes for maintenance
- User story 30: Retire bikes
- User story 31: View all bike statuses
- User story 32: See lowest availability stations
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.