ProductAnnotations table

The ProductAnnotations table in the FitStack - V2 schema has 13 columns, keyed by Id, with 3 foreign keys to Products and Users.

Human correction queue. Drives annotator pay via Users.PayRate (01).

Columns (13)

Columns of the ProductAnnotations table
ColumnTypeConstraintsDescription
Iduuidprimary key, not null
ProductIduuidnot null, references Products.Id
AnnotatorUserIdcharacter varying(450)not null, references Users.Id
ReviewedByUserIdcharacter varying(450)references Users.Id
EditedAttimestamp with time zonenot null
FieldsChangedJsonjsonbnot null
ReviewStatusintegernot null`AnnotationReviewStatus` — Pending 0, Verified 1, Rejected 2. Declared INLINE in ProductAnnotation.cs, not in Domain/Enums.
ReviewedAttimestamp with time zone
RejectionNotecharacter varying(1000)
CreatedAttimestamp with time zonenot null
ModifiedAttimestamp with time zone
IsDeletedbooleannot null
DeletedAttimestamp with time zone

Indexes (4)

  • (ProductId, EditedAt) (IX_ProductAnnotations_ProductId_EditedAt)
  • (AnnotatorUserId, ReviewStatus) (IX_ProductAnnotations_AnnotatorUserId_ReviewStatus)
  • (ReviewStatus, EditedAt) (IX_ProductAnnotations_ReviewStatus_EditedAt)
  • (ReviewedByUserId) (IX_ProductAnnotations_ReviewedByUserId)

Relationships

  • ProductAnnotations.ProductId references Products.Id
  • ProductAnnotations.AnnotatorUserId references Users.Id
  • ProductAnnotations.ReviewedByUserId references Users.Id