You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Coworking members who drive need to know whether they have an assigned parking spot. Currently there is no way for the hub to track or assign parking spots, forcing manual coordination outside the platform.
Context
User entity: backend/src/users/entities/user.entity.ts
NotificationsModule for assignment notifications: backend/src/notifications/
Pattern mirrors the Locker management module (BE-18)
Tasks
Create ParkingSpot entity: id, spotNumber (varchar, unique, e.g. A-12), level (varchar, e.g. Ground Floor), type (STANDARD / ACCESSIBLE / MOTORCYCLE / EV_CHARGING), assignedToUserId (nullable FK → User), assignedAt (nullable timestamptz), isActive (bool, default true), notes (nullable), createdAt, updatedAt
GET /parking — list spots:
Admin: all spots with assignee names, status
Member: only their own assigned spot (empty array if none)
POST /parking — add a new parking spot (admin only)
POST /parking/:id/assign — assign spot to a member (admin only); reject if spot already assigned; notify member in-app: "Parking spot [number] has been assigned to you"
POST /parking/:id/unassign — release spot (admin only); notify affected member
GET /parking/mine — member views their assigned spot details; returns null if none assigned
Overview
Coworking members who drive need to know whether they have an assigned parking spot. Currently there is no way for the hub to track or assign parking spots, forcing manual coordination outside the platform.
Context
Userentity:backend/src/users/entities/user.entity.tsNotificationsModulefor assignment notifications:backend/src/notifications/Tasks
ParkingSpotentity:id,spotNumber(varchar, unique, e.g.A-12),level(varchar, e.g.Ground Floor),type(STANDARD/ACCESSIBLE/MOTORCYCLE/EV_CHARGING),assignedToUserId(nullable FK → User),assignedAt(nullable timestamptz),isActive(bool, default true),notes(nullable),createdAt,updatedAtGET /parking— list spots:POST /parking— add a new parking spot (admin only)PATCH /parking/:id— update spot level, type, notes (admin only)POST /parking/:id/assign— assign spot to a member (admin only); reject if spot already assigned; notify member in-app: "Parking spot [number] has been assigned to you"POST /parking/:id/unassign— release spot (admin only); notify affected memberGET /parking/mine— member views their assigned spot details; returnsnullif none assignedParkingModuleinAppModuleFiles to Modify / Create
backend/src/parking/(module, entity, controller, service)backend/src/app.module.ts