ProductSessions table

The ProductSessions table in the FitStack - V2 schema has 22 columns, keyed by Id, with 1 foreign key to Products. 1 column in NutriScanJobs references it.

One user scanning one product. C# class is `ProductSession`, in the file ProductionSession.cs.

Columns (22)

Columns of the ProductSessions table
ColumnTypeConstraintsDescription
Iduuidprimary key, not null
CorrelationIduuidnot null
ProductIduuidreferences Products.Id
UserIdtext
Barcodecharacter varying(32)
Statuscharacter varying(50)not null`ProductSessionStatus` as TEXT.
HasNutritionbooleannot null
HasIngredientsbooleannot null
HasBrandingbooleannot null
HasBarcodebooleannot null
NutritionIduuid
BrandingIduuid
IngredientIdsjsonbnot null
BarcodeIdsjsonbnot null
BrandingProductIduuid
NutritionProductIduuid
CompletedAttimestamp with time zone
FailureReasoncharacter varying(500)
CreatedAttimestamp with time zonenot null
ModifiedAttimestamp with time zone
IsDeletedbooleannot null
DeletedAttimestamp with time zone

Indexes (5)

  • (CorrelationId) (IX_ProductCreationSession_CorrelationId)
  • (Barcode) (IX_ProductCreationSession_Barcode)
  • (Status) (IX_ProductCreationSession_Status)
  • (Status, CreatedAt) (IX_ProductCreationSession_Status_CreatedAt)
  • (ProductId) (IX_ProductSessions_ProductId)

Relationships