Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| id | INT | 10 | √ | null |
|
|
|||||
| user_id | INT | 10 | null |
|
|
||||||
| coupon_id | INT | 10 | null |
|
|
||||||
| acquired_at | DATETIME | 23 | CURRENT_TIMESTAMP(3) |
|
|
||||||
| use_count | INT | 10 | 0 |
|
|
||||||
| is_available | BIT | 1 | 1 |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| PRIMARY | Primary key | Asc | id |
| user_coupons_coupon_id_fkey | Performance | Asc | coupon_id |
| user_coupons_user_id_coupon_id_key | Must be unique | Asc/Asc | user_id + coupon_id |

