<aside>

</aside>

Bảng promotion_redemptions

Cột Kiểu Null? Default Ràng buộc / Ghi chú
id UUID NO PK
promotion_id UUID NO FK → promotions(id) ON DELETE CASCADE
user_id UUID NO FK → users(id) ON DELETE CASCADE
order_id UUID NO FK → orders(id) ON DELETE RESTRICT
used_at TIMESTAMP NO now() Thời điểm sử dụng

Record Promotion Usage Command

List Promotion Usages By User Query

List Promotion Usages By Order Query

List Promotion Usages By Promotion Query

Get Promotion Usage Stats Query