Appearance
Room
hostel.room · every change is kept in the audit log · numbered {hostel}-{room_no}
Fields
Every record also has id, created_at and updated_at.
| Field | Label | Type | Rules |
|---|---|---|---|
hostel | hostel | link → hostel.hostel | required |
room_type | room type | link → hostel.room_type | required |
room_no | room no | text | required |
floor | floor | number | min 0 |
capacity | capacity | number | required; min 1 |
fee | fee | money | |
room_category | room category | select | one of: UG, PG, UG & PG; default "UG & PG" |
is_active | is active | check | default true |
is_reserved | is reserved | check | default false |
reserved_purpose | reserved purpose | text |
Unique together: hostel + room_no
Permissions
| Role | Can |
|---|---|
hostel:admin | read, create, update, delete, import, export |
hostel:warden | read, update — only rows in the user's scope (via hostel) |
hostel:accounts | read |
hostel:student | read |
API
http
GET /api/hostel/room?<field>=<value>&limit=100&offset=0
POST /api/hostel/room
GET /api/hostel/room/:id
PATCH /api/hostel/room/:id
DELETE /api/hostel/room/:idBulk import: GET /api/_import/hostel/room/template (CSV template), then POST /api/_import/hostel/room. See REST API.