Skip to content

Issue #1 — Backend: Workspace Entity & Module Scaffold #725

@yusuftomilola

Description

@yusuftomilola

Location: backend/src/workspaces/

Description

ManageHub needs a Workspaces module on the backend to manage coworking spaces, private offices, meeting rooms, and other bookable resources within a hub. This issue covers the foundational setup — the database entity, the NestJS module, and the bare service/controller scaffold that subsequent issues will build on.

The platform uses NestJS with TypeORM and PostgreSQL. The synchronize: true flag is active, so schema changes apply automatically on restart. All monetary values (prices) must be stored in kobo (smallest Nigerian currency unit) as integers to avoid floating-point errors.

Acceptance Criteria

  • A Workspace entity is created at backend/src/workspaces/entities/workspace.entity.ts with the following fields:
    • id — UUID, primary key, auto-generated
    • name — string, required
    • description — text, optional
    • type — enum: OPEN_DESK, PRIVATE_OFFICE, MEETING_ROOM, EVENT_SPACE, VIRTUAL_OFFICE
    • capacity — integer (number of seats), required
    • pricePerHourKobo — integer, nullable
    • pricePerDayKobo — integer, nullable
    • pricePerMonthKobo — integer, nullable
    • amenities — simple-array of strings, nullable
    • images — simple-array of strings (URLs), nullable
    • isActive — boolean, default true
    • createdAt / updatedAt — auto timestamps
  • A WorkspacesModule is created at backend/src/workspaces/workspaces.module.ts with TypeOrmModule.forFeature([Workspace]) registered
  • A WorkspacesService stub is created at backend/src/workspaces/providers/workspaces.service.ts
  • A WorkspacesController stub is created at backend/src/workspaces/workspaces.controller.ts with the @Controller('workspaces') decorator
  • WorkspacesModule is imported into backend/src/app.module.ts
  • npx tsc --noEmit passes with no errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions