ㅅㄴㄷㅅ

Tables (13)

category

  • id — INT — Primary key — NOT NULL
  • created_at — DATETIME(0) — NOT NULL
  • updated_at — DATETIME(0) — NOT NULL
  • category_name — VARCHAR(20)
  • parent_id — INT — Foreign key → category.id

message

  • id — INT — Primary key — NOT NULL
  • sender_id — INT — Foreign key → user.id — NOT NULL
  • trade_id — INT — Foreign key → trade.id — NOT NULL
  • created_at — DATETIME(0) — NOT NULL
  • updated_at — DATETIME(0) — NOT NULL
  • message_type — ENUM('NORMAL', 'PENDING', 'IN_PERSON', 'SHIPPING', 'CANCELED', 'COMPLETED') — NOT NULL
  • content — TEXT

message_img

  • id — INT — Primary key — NOT NULL
  • message_id — INT — Foreign key → message.id — NOT NULL
  • created_at — DATETIME(0) — NOT NULL
  • updated_at — DATETIME(0) — NOT NULL
  • url — VARCHAR(512)

post

  • id — INT — Primary key — NOT NULL
  • region_id — INT — Foreign key → region.id — NOT NULL
  • posting_user_id — INT — Foreign key → user.id — NOT NULL
  • category_id — INT — Foreign key → category.id
  • created_at — DATETIME(0) — NOT NULL
  • updated_at — DATETIME(0) — NOT NULL
  • status — ENUM('OPEN', 'CLOSE') — NOT NULL
  • price — INT
  • delivery_charge — INT
  • transaction_type — ENUM('IN_PERSON', 'PARCEL')
  • content — TEXT
  • views — INT
  • is_deleted — TINYINT(1)
  • deleted_at — DATETIME(0)
  • title — VARCHAR(100)

post_following

  • id — INT — Primary key — NOT NULL
  • user_id — INT — Foreign key → user.id — NOT NULL
  • post_id — INT — Foreign key → post.id — NOT NULL
  • created_at — DATETIME(0) — NOT NULL
  • updated_at — DATETIME(0) — NOT NULL

post_img

  • id — INT — Primary key — NOT NULL
  • post_id — INT — Foreign key → post.id — NOT NULL
  • created_at — DATETIME(0) — NOT NULL
  • updated_at — DATETIME(0) — NOT NULL
  • url — VARCHAR(512)

region

  • id — INT — Primary key — NOT NULL
  • created_at — DATETIME(0) — NOT NULL
  • updated_at — DATETIME(0) — NOT NULL
  • sido — VARCHAR(20)
  • sigungu — VARCHAR(20)
  • eubmyeonli — VARCHAR(20)
  • region_code — VARCHAR(20)

review

  • id — INT — Primary key — NOT NULL
  • trade_record_id — INT — Foreign key → trade_record.id — NOT NULL
  • post_id — INT — Foreign key → post.id — NOT NULL
  • created_at — DATETIME(0) — NOT NULL
  • updated_at — DATETIME(0) — NOT NULL
  • rating — INT
  • content — TEXT

review_img

  • id — INT — Primary key — NOT NULL
  • review_id — INT — Foreign key → review.id — NOT NULL
  • created_at — DATETIME(0) — NOT NULL
  • updated_at — DATETIME(0) — NOT NULL
  • url — VARCHAR(512)

trade

  • id — INT — Primary key — NOT NULL
  • post_id — INT — Foreign key → post.id — NOT NULL
  • buyer_id — INT — Foreign key → user.id — NOT NULL
  • seller_id — INT — Foreign key → user.id — NOT NULL
  • status — ENUM('PENDING', 'IN_PERSON', 'SHIPPING', 'CANCELED', 'COMPLETED') — NOT NULL
  • is_close — TINYINT(1)
  • closed_at — DATETIME(0)
  • created_at — DATETIME(0) — NOT NULL
  • updated_at — DATETIME(0) — NOT NULL

trade_record

  • id — INT — Primary key — NOT NULL
  • trade_id — INT — Foreign key → trade.id — NOT NULL
  • region_id — INT — Foreign key → region.id
  • amount — INT
  • address_detail — VARCHAR(255)
  • created_at — DATETIME(0) — NOT NULL
  • updated_at — DATETIME(0) — NOT NULL

user

  • id — INT — Primary key — NOT NULL
  • region_id — INT — Foreign key → region.id — NOT NULL
  • username — VARCHAR(20) — NOT NULL
  • created_at — DATETIME(0) — NOT NULL
  • updated_at — DATETIME(0) — NOT NULL
  • profile_url — VARCHAR(512)
  • phone_num — VARCHAR(20)
  • address_detail — VARCHAR(100)
  • deleted_at — DATETIME(0)

user_local_account

  • id — INT — Primary key — NOT NULL
  • user_id — INT — Foreign key → user.id — NOT NULL
  • email — VARCHAR(255) — NOT NULL
  • password_hash — VARCHAR(255) — NOT NULL
  • created_at — DATETIME(0) — NOT NULL
  • updated_at — DATETIME(0) — NOT NULL