meokbo

Tables (10)

cart_items (Untitled10)

  • PK (id) — int — Primary key — NOT NULL
  • FK (user_id) — int — Foreign key → user.PK — NOT NULL
  • FK (product_id) — int — Foreign key → products.PK — NOT NULL
  • (quantity) — int
  • (created_at) — datetime

comments (Untitled5)

  • FK (user_id) — int — Foreign key → user.PK — NOT NULL
  • FK (Post_id) — int — Foreign key → posts.PK — NOT NULL
  • PK (id) — int — Foreign key → posts.FK — NOT NULL
  • (content) — mediumtext
  • (created_at) — datetime

group_deals (Untitled2)

  • PK (id) — int — Primary key — NOT NULL
  • FK (product_id) — int — Foreign key → products.PK — NOT NULL
  • (title) — varchar(150)
  • (target_count) — int
  • (current_count) — int
  • (discount_price) — int
  • (deadline) — datetime
  • (created_at) — timestamp

group_participants (Untitled3)

  • PK (id) — int — Foreign key → user.PK — NOT NULL
  • FK (deal_id) — int — Foreign key → group_deals.PK — NOT NULL
  • PK (id2) — int — Foreign key → group_deals.FK — NOT NULL
  • (joined_at) — timestamp

order_items (Untitled7)

  • PK (id) — int — Foreign key → orders.PK — NOT NULL
  • FK (order_id) — int — Foreign key → orders.FK — NOT NULL
  • FK (product_id) — int — Foreign key → products.PK — NOT NULL
  • (quantity) — int
  • (unit_price) — int

orders (Untitled6)

  • FK (user_id) — int — Primary key — NOT NULL
  • PK (id) — int — Foreign key → user.PK — NOT NULL
  • (total_price) — int
  • (status) — varchar(20)
  • (created_at) — datetime

posts (Untitled4)

  • PK (id) — int — Primary key — NOT NULL
  • FK (user_id) — int — Foreign key → user.PK — NOT NULL
  • (title) — varchar(200)
  • (content) — mediumtext
  • (created_at) — datetime

products (Untitled9)

  • PK (id) — int — Primary key — NOT NULL
  • (name) — varchar(200)
  • (description) — mediumtext
  • (region) — varchar(50)
  • (price) — int
  • (image_url) — varchar(255)
  • (created_at) — datetime

user (Untitled)

  • PK (id) — int — Primary key — NOT NULL
  • (email) — varchar(100)
  • (password_hash) — varchar(255)
  • (name) — varchar(50)
  • (created_at) — datetime

wish_items (Untitled8)

  • PK (id) — int — Primary key — NOT NULL
  • FK (user_id) — int — Foreign key → user.PK — NOT NULL
  • FK (product_id) — int — Foreign key → products.PK — NOT NULL
  • (created_at) — datetime