shop_coupons

0 rows


Columns

Column Type Size Nulls Auto Default Children Parents Comments
id INT 10 null
shop_coupon_products.coupon_id shop_coupon_products_coupon_id_fkey R
shop_coupon_uses.coupon_id shop_coupon_uses_coupon_id_fkey R
user_coupons.coupon_id user_coupons_coupon_id_fkey R
shop_id INT 10 null
shops.id shop_coupons_shop_id_fkey R
code VARCHAR 191 null
name VARCHAR 191 null
discount_type VARCHAR 191 null
discount_value DOUBLE 22 null
is_auto_apply BIT 1 0
is_combinable BIT 1 0
max_uses_per_user INT 10 null
total_max_uses INT 10 null
starts_at DATETIME 23 null
expires_at DATETIME 23 null
status VARCHAR 191 null
created_at DATETIME 23 CURRENT_TIMESTAMP(3)
updated_at DATETIME 23 null
deleted_at DATETIME 19 null

Indexes

Constraint Name Type Sort Column(s)
PRIMARY Primary key Asc id
shop_coupons_code_key Must be unique Asc code
shop_coupons_shop_id_fkey Performance Asc shop_id

Relationships