hanghae

Tables (8)

coupon

  • id — BIGINT
  • name — VARCHAR(255) — NOT NULL
  • discount_rate — DECIMAL(5, 2) — NOT NULL
  • total_quantity — INT — NOT NULL
  • issued_quantity — INT — NOT NULL
  • expiry_date — DATETIME — NOT NULL
  • created_at — DATETIME — NOT NULL

member

  • id — BIGINT
  • name — VARCHAR(255) — NOT NULL
  • balance — DECIMAL(19, 2) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

member_coupon

  • id — BIGINT
  • member_id — BIGINT — NOT NULL
  • coupon_id — BIGINT — NOT NULL
  • used_at — DATETIME
  • is_used — TINYINT(1) — NOT NULL
  • created_at — DATETIME — NOT NULL

order

  • id — BIGINT
  • member_id — BIGINT — NOT NULL
  • total_amount — DECIMAL(19, 2) — NOT NULL
  • status — VARCHAR(50) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

order_item

  • id — BIGINT
  • order_id — BIGINT — NOT NULL
  • product_id — BIGINT — NOT NULL
  • quantity — INT — NOT NULL
  • price_at_order — DECIMAL(19, 2) — NOT NULL

payment_history

  • id — BIGINT
  • order_id — BIGINT — NOT NULL
  • amount — DECIMAL(19, 2) — NOT NULL
  • status — VARCHAR(50) — NOT NULL
  • created_at — DATETIME — NOT NULL

product

  • id — BIGINT
  • name — VARCHAR(255) — NOT NULL
  • price — DECIMAL(19, 2) — NOT NULL
  • stock_quantity — INT — NOT NULL
  • version — BIGINT — NOT NULL
  • created_at — DATETIME — NOT NULL

sales_statistics

  • id — BIGINT
  • product_id — BIGINT — NOT NULL
  • sales_date — DATE — NOT NULL
  • sales_count — INT — NOT NULL
  • updated_at — DATETIME — NOT NULL