Courses table

The Courses table in the FitStack - V2 schema has 21 columns, keyed by Id, with 4 foreign keys to Gyms, Studios, Trainers and Media. 3 columns in CourseSchedules, Sessions and CoursePrices reference it.

The template Sessions are made from. Glossary: Course; avoid Class.

Columns (21)

Columns of the Courses table
ColumnTypeConstraintsDescription
Iduuidprimary key, not null
GymIduuidnot null, references Gyms.Id
Namecharacter varying(200)not null
Descriptioncharacter varying(4000)
Categorycharacter varying(100)Free text with suggestions: Yoga, HIIT, Spin, Strength ...
DefaultStudioIduuidreferences Studios.Id
DefaultTrainerIduuidreferences Trainers.Id
DurationMinutesintegernot null
CapacityintegerNull = the Studio's capacity.
DropInPriceCentsintegerNull = no drop-ins; Membership only.
Currencycharacter varying(3)not null
IncludedInMembershipbooleannot null
LateCancelHoursintegernot nullCancelling inside this window counts as LateCancelled.
NoShowFeeCentsinteger
WaitlistEnabledbooleannot null
ImageMediaIduuidreferences Media.Id
Statustextnot null`CourseStatus`.
CreatedAttimestamp with time zonenot null
ModifiedAttimestamp with time zone
IsDeletedbooleannot null
DeletedAttimestamp with time zone

Indexes (1)

  • (GymId, Status) (IX_Courses_GymId_Status)

Relationships