wanted_market

테이블 (8)

거래 (Transactions)

  • TransactionId (transaction_id) — Long — 기본 키 — NOT NULL
  • Buyer Id (buyer_id) — Long — 외래 키 → 회원.User Id — NOT NULL — 구매 회원 고유키
  • Product Id (product_id) — Long — 외래 키 → 상품.Product Id — NOT NULL — 상품 고유키
  • Seller Id (seller_id) — Long — 외래 키 → 상품.Seller Id — NOT NULL — 판매 회원 고유키
  • State (state) — varchar(10) — NOT NULL — PendingApproval, Completed
  • price — Int — NOT NULL

거래 (Transaction2)

  • TransactionId (transaction_id) — Long — 기본 키 — NOT NULL
  • Product Id (product_id) — Long — 외래 키 → 상품.Product Id — NOT NULL — 상품 고유키
  • Seller Id (seller_id) — Long — 외래 키 → 판매자.Seller Id — NOT NULL — 판매자 PK
  • BuyerId (buyer_id) — Long — 외래 키 → 구매자.BuyerId — NOT NULL
  • State (state) — varchar(10) — NOT NULL
  • price — Int — NOT NULL

구매자 (BUYER)

  • BuyerId (buyer_id) — Long — 기본 키 — NOT NULL
  • User Id (user_id) — Long — 외래 키 → 회원.User Id — NOT NULL — 회원 고유키

상품 (PRODUCTS)

  • Product Id (product_id) — Long — 기본 키 — NOT NULL — 상품 고유키
  • Seller Id (seller_id) — Long — 외래 키 → 회원.User Id — NOT NULL — 판매 회원 고유키
  • ProductName (product_name) — varchar(30) — NOT NULL — 제품명
  • Price (product_price) — Int — NOT NULL — 제품 가격
  • State (state) — varchar(10) — NOT NULL — Available, Reserved, Completed
  • Count (count) — int — NOT NULL

상품 (PRODUCT2)

  • Product Id (product_id) — Long — 기본 키 — NOT NULL — 상품 고유키
  • Seller Id (seller_id) — Long — 외래 키 → 판매자.Seller Id — NOT NULL — 판매자 PK
  • ProductName (product_name) — String — NOT NULL — 제품명
  • Price (product_price) — Int — NOT NULL — 제품 가격
  • State (state) — varchar(10) — NOT NULL
  • Count (count) — int

판매자 (SELLER)

  • Seller Id (seller_id) — Long — 기본 키 — NOT NULL — 판매자 PK
  • User Id (user_id) — Long — 외래 키 → 회원.User Id — NOT NULL — 회원 고유키

회원 (USERS)

  • User Id (user_id) — Long — 기본 키 — NOT NULL — 회원 고유키
  • lonin id (login_id) — varchar(20) — NOT NULL — 회원 로그인 id
  • pw (encrypted_pw) — char(60) — NOT NULL — 암호화된 pw

회원 (USERS2)

  • User Id (user_id) — Long — 기본 키 — NOT NULL — 회원 고유키
  • lonin id (login_id) — varchar(20) — NOT NULL — 회원 로그인 id
  • login pw (login_pw) — varchar(20) — NOT NULL — 회원 로그인 pw