<aside>

</aside>

Table reviews [note: 'Bảng lưu các đánh giá (rating & review) của học viên cho bất kỳ sản phẩm nào (Course/Specialization)']
{
  id              uuid            [pk, note: 'Khóa chính của review']
  user_id         uuid            [not null, ref: > users.id, note: 'Người đánh giá']
  product_id      uuid            [not null, ref: > products.id, note: 'Khóa/Specialization được đánh giá']
  rating          int             [not null, note: 'Điểm sao (1–5)']
  title           varchar         [note: 'Tiêu đề ngắn gọn của review (tuỳ chọn)']
  content         text            [note: 'Nội dung chi tiết của review']
  status          review_status   [default: 'pending', note: 'pending/approved/rejected']
  created_at      timestamp       [default: `now()`, note: 'Thời điểm tạo review']
  updated_at      timestamp       [default: `now()`, note: 'Thời điểm cập nhật cuối']
  
  indexes {
    (product_id)  // nhanh lookup review theo khóa / chuyên đề
    (user_id, product_id) [unique]  // mỗi user chỉ review 1 lần cho 1 product
  }
}

Create Review Command

Update Review Command

List Reviews By Product Query

Get Rating Summary Query

Get Review Detail Query

List Reviews By User Query

Archive Review Command (Admin)

Approve Review Command (Admin)

Reject Review Command (Admin)

List Pending Reviews Query (Admin)