PlanImpressions table
The PlanImpressions table in the FitStack - V2 schema has 11 columns, keyed by Id, with 2 foreign keys to Users.
Columns (11)
| Column | Type | Constraints | Description |
|---|---|---|---|
| Id | uuid | primary key, not null | |
| ViewerUserId | text | not null, references Users.Id | |
| SellerUserId | text | not null, references Users.Id | |
| PlanType | integer | not null | |
| PlanId | uuid | not null | |
| ViewedAt | timestamp with time zone | not null | |
| ViewedDate | date | not null | Date component, so the unique index dedupes to one impression per viewer per plan per day. |
| CreatedAt | timestamp with time zone | not null | |
| ModifiedAt | timestamp with time zone | ||
| IsDeleted | boolean | not null | |
| DeletedAt | timestamp with time zone |
Indexes (1)
(ViewerUserId, PlanType, PlanId, ViewedDate)unique (IX_PlanImpressions_Viewer_PlanType_PlanId_ViewedDate)