CoursePrices table
The CoursePrices table in the FitStack - V2 schema has 4 columns, keyed by Id, with 2 foreign keys to Courses and GymSubscriptions.
Lets a Course cost different amounts by Membership Offer. From ClassPrices (81).
Columns (4)
| Column | Type | Constraints | Description |
|---|---|---|---|
| Id | uuid | primary key, not null | |
| CourseId | uuid | not null, references Courses.Id | CASCADE. |
| OfferId | uuid | not null, references GymSubscriptions.Id | |
| PriceCents | integer | not null | Per-Session price for holders of this Offer. 0 = included. |
Indexes (1)
(CourseId, OfferId)unique (IX_CoursePrices_CourseId_OfferId)
Relationships
CoursePrices.CourseIdreferencesCourses.IdCoursePrices.OfferIdreferencesGymSubscriptions.Id