hanplane

Tables (8)

Untitled (coupon)

  • Key (id) — bigint — Primary key — NOT NULL
  • Field (discount_rate) — int
  • Field (issued_quantity) — int
  • Field (name) — varchar
  • Field (total_quantity) — int
  • Field (expired_at) — datetime
  • Field (created_at) — datetime
  • Field (updated_at) — datetime
  • Field (deleted_at) — datetime

Untitled (user_coupon)

  • Key (id) — bigint — Primary key — NOT NULL
  • Key (user_id) — bigint — Foreign key → users.Key — NOT NULL
  • Key (coupon_id) — bigint — Foreign key → Untitled.Key — NOT NULL
  • Field (coupon_status) — enum
  • Field (used_at) — datetime
  • Field (created_at) — datetime
  • Field (updated_at) — datetime

Untitled (refresh_token)

  • Key (id) — bigint — Primary key — NOT NULL
  • Key (user_id) — bigint — Foreign key → users.Key — NOT NULL
  • Field (created_at) — datetime
  • Field (expires_at) — datetime
  • Field (token) — varchar(255)

Untitled (product)

  • Key (id) — bigint — Primary key — NOT NULL
  • Field (name) — varchar
  • Field2 (price) — int
  • Field3 (total_quantity) — int
  • Field4 (avail_quantity) — int
  • Field (expired_at) — datetime
  • Field5 (created_at) — datetime
  • Field (updated_at) — datetime
  • Field (deleted_at) — datetime

Untitled (order)

  • Key (id) — bigint — Primary key — NOT NULL
  • Key (user_id) — bigint — Foreign key → users.Key — NOT NULL
  • Key (coupon_id) — bigint — Foreign key → Untitled.Key — NOT NULL
  • Field (total_price) — int
  • Field (order_status) — Enum
  • Field (created_at) — datetime
  • Field (updated_at) — datetime

Untitled (order_item)

  • Key (id) — bigint — Primary key — NOT NULL
  • Key (product_id) — bigint — Foreign key → Untitled.Key — NOT NULL
  • Key (order_id) — bigint — Foreign key → Untitled.Key — NOT NULL
  • Key (coupon_id) — bigint — Foreign key → Untitled.Key — NOT NULL
  • Key (user_id) — bigint — Foreign key → Untitled.Key — NOT NULL
  • Field (quantity) — int
  • Field (price) — int

Untitled (payment)

  • Key (id) — bigint — Primary key — NOT NULL
  • Key (order_id) — bigint — Foreign key → Untitled.Key — NOT NULL
  • Key (user_id) — bigint — Foreign key → Untitled.Key — NOT NULL
  • Key (coupon_id) — bigint — Foreign key → Untitled.Key — NOT NULL
  • Field (idempotency_key) — varchar
  • Field2 (pg_payment_id) — varchar
  • Field3 (transaction_id) — varchar
  • Field4 (pay_method) — varchar
  • Field5 (pay_status) — Enum
  • Field6 (amount) — int
  • Field (paid_at) — datetime
  • Field (created_at) — datetime
  • Field (updated_at) — datetime

users

  • Key (id) — bigint — Primary key — NOT NULL
  • Field (email) — varchar(255)
  • Field2 (password) — varchar(255)
  • Field3 (role) — enum
  • Field (created_at) — datetime
  • Field (updated_at) — datetime
  • Field (deleted_at) — datetime