Entity Reference
Detailed reference for every table in the GCMS database.
users
Stores user account information populated from Microsoft OAuth on first sign-in.
Column |
Type |
Notes |
|---|---|---|
|
|
Primary key, auto-generated |
|
|
From Microsoft profile |
|
|
From Microsoft profile |
|
|
Unique, from Microsoft profile |
|
|
Unique Microsoft account identifier |
|
|
Unique, 3–20 characters, user-chosen |
|
|
Account creation timestamp |
|
|
Most recent login timestamp |
|
|
Whether the user has opted into email notifications, default |
projects
Represents a group coursework project. Each project has one team leader
and a deadline, with members joined via user_projects.
Column |
Type |
Notes |
|---|---|---|
|
|
Primary key, auto-generated |
|
|
FK → |
|
|
FK → |
|
|
Display name |
|
|
Final due date |
|
|
Creation timestamp |
|
|
Last update timestamp |
user_projects
Junction table establishing the many-to-many relationship between users and projects.
Column |
Type |
Notes |
|---|---|---|
|
|
FK → |
|
|
FK → |
The composite primary key (user_id, project_id) ensures a user
cannot be added to the same project twice.
tasks
Individual units of work within a project. Tasks have weights that feed into the contribution tracking system.
Column |
Type |
Notes |
|---|---|---|
|
|
Primary key, auto-generated |
|
|
FK → |
|
|
FK → |
|
|
Short title |
|
|
Optional detail |
|
|
Used to calculate contribution percentages |
|
|
Enum (see Custom Types below) |
|
|
Optional task-level deadline |
|
|
Creation timestamp |
|
|
Last update timestamp |
messages
Chat messages within a project’s group chat. Loaded historically on page open and updated in real-time via Socket.io.
Column |
Type |
Notes |
|---|---|---|
|
|
Primary key, auto-generated |
|
|
FK → |
|
|
FK → |
|
|
Message body |
|
|
Send timestamp |
meetings
Scheduled meetings within a project. Each meeting also creates a corresponding event in the team leader’s Microsoft calendar via the Graph API.
Column |
Type |
Notes |
|---|---|---|
|
|
Primary key, auto-generated |
|
|
FK → |
|
|
FK → |
|
|
When the meeting starts |
|
|
Duration in minutes |
|
|
Enum (see Custom Types below) |
|
|
Optional agenda or notes |
meeting_attendances
Tracks which users attended which meetings.
Column |
Type |
Notes |
|---|---|---|
|
|
Primary key, auto-generated |
|
|
FK → |
|
|
FK → |
|
|
Enum (see Custom Types below) |
|
|
Time the user checked in |
notifications
Per-user notifications generated by activity across projects.
Includes denormalised target_username and project_name fields
to avoid extra joins when rendering notification messages.
Column |
Type |
Notes |
|---|---|---|
|
|
Primary key, auto-generated |
|
|
FK → |
|
|
FK → |
|
|
Enum (see Custom Types below) |
|
|
Display text |
|
|
Creation timestamp |
|
|
Denormalised — user the notification refers to |
|
|
Denormalised — project the notification refers to |
widgets
Sticky-note style widgets placed on the interactive project board.
Each widget has a position on the board (widget_x, widget_y)
and free-form text.
Column |
Type |
Notes |
|---|---|---|
|
|
Primary key, auto-generated |
|
|
FK → |
|
|
X coordinate on the board |
|
|
Y coordinate on the board |
|
|
Widget content, optional |
files
Metadata for files uploaded to a project’s shared folder. The actual file contents are stored in a Supabase Storage bucket; this table only tracks the metadata.
Column |
Type |
Notes |
|---|---|---|
|
|
Primary key, auto-generated |
|
|
FK → |
|
|
Original file name as uploaded |
|
|
Path within the Supabase Storage bucket |
|
|
File size in bytes |
|
|
Upload timestamp |
ai_chat_messages
Stores the per-project chat history with the GCMS AI assistant (powered by Google Gemini). Each row represents one message in the conversation, from either the user or the assistant.
Column |
Type |
Notes |
|---|---|---|
|
|
Primary key, auto-generated |
|
|
FK → |
|
|
FK → |
|
|
Enum (see Custom Types below) |
|
|
Message body |
|
|
Send timestamp, defaults to |
An index on (project_id, ai_date_sent) keeps history retrieval fast
even as conversations grow.
Custom Types
GCMS uses several PostgreSQL enum types to constrain values to a fixed set of options.
task_statusUsed by
tasks.task_status. Represents the lifecycle state of a task.To DoIn ProgressCompleted
meeting_locationUsed by
meetings.meeting_location. Indicates whether a meeting takes place online or in person.VirtualPresential
attendance_statusUsed by
meeting_attendances.attendance_status. Records whether a user attended a meeting.PresentNot Present
notification_typeUsed by
notifications.notification_type. Determines the category of a notification, used by the frontend to choose icon and styling.Message— a new chat messageProject— project-level updateMember Leave— a member left the projectMember Join— a member joined the projectLeader— leadership changeTask— task assigned, updated, or completed
ai_chat_roleUsed by
ai_chat_messages.role. Distinguishes who sent each message in an AI assistant conversation.user— the human’s messageassistant— the AI’s response