ProductReviews table
The ProductReviews table in the FitStack - V2 schema has 10 columns, keyed by Id, with 2 foreign keys to Products and Users.
Columns (10)
| Column | Type | Constraints | Description |
|---|---|---|---|
| Id | uuid | primary key, not null | |
| ProductId | uuid | not null, references Products.Id | |
| UserId | text | not null, references Users.Id | |
| Rating | integer | not null | |
| Title | character varying(120) | ||
| Body | character varying(2000) | ||
| CreatedAt | timestamp with time zone | not null | |
| ModifiedAt | timestamp with time zone | ||
| IsDeleted | boolean | not null | |
| DeletedAt | timestamp with time zone |
Indexes (3)
(ProductId, UserId)unique (IX_ProductReviews_ProductId_UserId_Unique)(ProductId)(IX_ProductReviews_ProductId)(UserId)(IX_ProductReviews_UserId)
Relationships
ProductReviews.ProductIdreferencesProducts.IdProductReviews.UserIdreferencesUsers.Id