PlanImpressions table

The PlanImpressions table in the FitStack - V2 schema has 11 columns, keyed by Id, with 2 foreign keys to Users.

Columns (11)

Columns of the PlanImpressions table
ColumnTypeConstraintsDescription
Iduuidprimary key, not null
ViewerUserIdtextnot null, references Users.Id
SellerUserIdtextnot null, references Users.Id
PlanTypeintegernot null
PlanIduuidnot null
ViewedAttimestamp with time zonenot null
ViewedDatedatenot nullDate component, so the unique index dedupes to one impression per viewer per plan per day.
CreatedAttimestamp with time zonenot null
ModifiedAttimestamp with time zone
IsDeletedbooleannot null
DeletedAttimestamp with time zone

Indexes (1)

  • (ViewerUserId, PlanType, PlanId, ViewedDate) unique (IX_PlanImpressions_Viewer_PlanType_PlanId_ViewedDate)

Relationships

  • PlanImpressions.ViewerUserId references Users.Id
  • PlanImpressions.SellerUserId references Users.Id