Skip to content

Reviews

reviews

Table: public.reviews

Column Type Default Description
id uuid PK UUID
user_id uuid FK → profiles(id) Reviewer
product_id uuid FK → products(id) nullable Product review
pharmacy_id uuid FK → sellers(id) nullable Pharmacy review
rating int NOT NULL 1-5
comment text nullable
images jsonb '[]' Photo URLs
is_verified_purchase boolean false Purchase verified
is_active boolean true Visible
created_at timestamptz now()
updated_at timestamptz now()

Indexes

  • idx_reviews_product on reviews(product_id)
  • idx_reviews_pharmacy on reviews(pharmacy_id)