practice

Tables (6)

chatroom (채팅방)

  • 아이디 (id) — bigint — Primary key — NOT NULL — auto_increment
  • 아이디 (id2) — bigint — Foreign key → trades.아이디 — NOT NULL — auto_increment
  • 아이디 (id22) — bigint — Foreign key → trades.아이디 — NOT NULL — auto_increment
  • 아이디 (id3) — bigint — Foreign key → trades.아이디 — NOT NULL — auto_increment
  • 용품 아이디 (item_id) — bigint — NOT NULL
  • 구매자 아이디 (buyer_id) — bigint — NOT NULL
  • 판매자 아이디 (seller_id) — bigint — NOT NULL
  • 채팅 생성 날짜 (created_at) — DateTime — NOT NULL
  • 채팅 수정 날짜 (updated_at) — DateTime — NOT NULL

images (이미지)

  • 아이디 (id) — bigint — Primary key — NOT NULL — auto_increment
  • 아이디 (id2) — bigint — Foreign key → items.아이디 — NOT NULL — auto_increment
  • 용품 아이디 (item_id) — bigint — NOT NULL

items (스포츠 용품)

  • 아이디 (id) — bigint — Primary key — NOT NULL — auto_increment
  • 용품 이름 (name) — varchar(80) — NOT NULL
  • 상품 상태 (status) — ENUM(UNUSED,LIKE_NEW,MINT,HEAVILY_USED,,DAMAGED) — NOT NULL
  • 설명 (description) — TEXT — NOT NULL
  • 가격 (price) — int — NOT NULL
  • 카테고리 (category) — enum — NOT NULL
  • 재고 (stock) — int — NOT NULL
  • 등록 날짜 (created_at) — DateTime — NOT NULL
  • 수정 날짜 (updated_at) — DateTime — NOT NULL

members (멤버)

  • 아이디 (id) — bigint — Primary key — NOT NULL — auto_increment
  • 닉네임 (nickname) — varchar(20) — NOT NULL — unique
  • 이메일 (email) — varchar(254) — NOT NULL — unique
  • 비밀번호 (password) — varchar(255) — NOT NULL
  • 접속상태 (Field) — boolean — NOT NULL

messages (메시지)

  • 아이디 (id) — bigint — Primary key — NOT NULL
  • 내용 (content) — TEXT — NOT NULL
  • 읽음 여부 (is_read) — boolean — NOT NULL
  • 생성날짜 (created_at) — DateTime — NOT NULL
  • 채팅방 아이디 (chatroom_id) — bigint — Foreign key → chatroom.아이디 — NOT NULL — auto_increment
  • 아이디 (id2) — bigint — Foreign key → members.아이디 — NOT NULL — auto_increment
  • 아이디 (id22) — bigint — Foreign key → chatroom.아이디 — NOT NULL — auto_increment
  • 아이디 (id222) — bigint — Foreign key → chatroom.아이디 — NOT NULL — auto_increment
  • 아이디 (id3) — bigint — Foreign key → chatroom.아이디 — NOT NULL — auto_increment

trades (거래)

  • 아이디 (id) — bigint — Primary key — NOT NULL — auto_increment
  • 아이디 (id2) — bigint — Foreign key → members.아이디 — NOT NULL — auto_increment
  • 아이디 (id3) — bigint — Foreign key → items.아이디 — NOT NULL — auto_increment
  • 용품 아이디 (item_id) — bigint — NOT NULL
  • 구매자 아이디 (buyer_id) — bigint — NOT NULL
  • 판매자 아이디 (seller_id) — bigint — NOT NULL
  • 거래일 (trading_day) — DateTime — NOT NULL
  • 평점 (rating) — smallint(6)
  • 후기 (review) — TEXT
  • 거래 완료 여부 (is_completed) — boolean — NOT NULL