erd

Tables (9)

Untitled (CUSTOMER)

  • Key1 (phone_number) — string — Primary key — NOT NULL
  • Field (created_at) — timestamp

Untitled (ORDERS)

  • Key1 (id) — bigint — Primary key — NOT NULL
  • Key1 (phone_number) — string — Foreign key → Untitled.Key1 — NOT NULL
  • Field (order_number) — string
  • Field (order_type) — enum('DINE_IN','PICKUP')
  • Field (status) — enum('PENDING','ACCEPTED','COMPLETED','REJECTED','CANCELLED')
  • Field (reject_reason) — string NULL
  • Field (total_quantity) — int
  • Field (total_amount) — int
  • Field (created_at) — timestamp

Untitled (PREPAID_TRANSACTION)

  • Key (id) — bigint — Primary key — NOT NULL
  • Key1 (customer_phone) — string — Foreign key → Untitled.Key1 — NOT NULL
  • Field (amount) — int
  • Field (type) — enum('CHARGE | DEDUCT')
  • Field (created_at) — timestamp

Untitled (PREPAID_ACCOUNT)

  • Key (id) — bigint — Primary key — NOT NULL
  • Key1 (customer_phone) — string — Foreign key → Untitled.Key1 — NOT NULL
  • Field (balance) — int
  • Field (updated_at) — timestamp

Untitled (STAMP_HISTORY)

  • Key (id) — bigint — Primary key — NOT NULL
  • Key1 (customer_phone) — string — Foreign key → Untitled.Key1 — NOT NULL
  • Field (amount) — int
  • Field (type) — enum('EARN | USE')
  • Field (created_at) — timestamp

Untitled (STAMP_ACCOUNT)

  • Key (id) — bigint — Primary key — NOT NULL
  • Key1 (customer_phone) — string — Foreign key → Untitled.Key1 — NOT NULL
  • Field (current_stamps) — int
  • Field (total_coupons) — int
  • Field (created_at) — timestamp

Untitled (BLACKLIST)

  • Key (id) — bigint — Primary key — NOT NULL
  • Key1 (phone_number) — string — Foreign key → Untitled.Key1 — NOT NULL
  • Field (registered_at) — timestamp

Untitled (NOTIFICATION)

  • Key (id) — bigint — Primary key — NOT NULL
  • Key1 (phone_number) — string — Foreign key → Untitled.Key1 — NOT NULL
  • Field (type) — enum('ORDER_STATUS | STAMP_EARNED | COUPON_CREATED')
  • Field (message) — string
  • Field (is_read) — boolean
  • Field (created_at) — timestamp

Untitled (VERIFICATION)

  • Key (id) — bigint — Primary key — NOT NULL
  • Key1 (phone_number) — string — Foreign key → Untitled.Key1 — NOT NULL
  • Field (code) — string
  • Field (expires_at) — timestamp
  • Field (verified) — boolean
  • Field (created_at) — timestamp
  • Field