B304ERD

테이블 (9)

띵구 (thinggus)

  • 띵구ID (thinggu_id) — BigInt — 기본 키 — NOT NULL — 복합키
  • 유저ID (user_id) — BigInt — 기본 키 — NOT NULL — 복합키
  • 친구신청여부 (friend_status) — Varchar — NOT NULL — Y: 친구목록, N: 친구요청목록

띵내역 (thing_history)

  • 띵내역ID (thing_history_id) — BigInt — 기본 키 — NOT NULL — auto increment
  • 유저ID (user_id) — BigInt — 외래 키 → 유저.유저ID — NOT NULL — auto increment
  • 띵변경 (change_thing) — Integer — NOT NULL — 추가된거면 + 감소된거면 -
  • 띵내용 (thing_content) — Varchar — NOT NULL — 띵 사용 내역 or 획득 내역

방명록 (guest_books)

  • 방명록 ID (guest_book_id) — Bigint — 기본 키 — NOT NULL — auto increment
  • 유저ID (user_id) — BigInt — 외래 키 → 유저.유저ID — NOT NULL
  • 작성자ID (guest_book_writer_id) — BigInt — NOT NULL
  • 내용 (guest_book_content) — Varchar
  • 작성날짜 (guest_book_write_day) — DATETIME — NOT NULL

스마트띵스 (smart_devices)

  • 기기ID (smart_device_id) — Varchar — 기본 키 — NOT NULL
  • 유저ID (user_id) — BigInt — 외래 키 → 유저.유저ID — NOT NULL
  • 오브제ID (object_id) — BigInt — 외래 키 → 오브제.오브제ID — NOT NULL

언박띵 내역 (unboxthing_history)

  • 언박띵ID (unboxthing_history_id) — BigInt — 기본 키 — NOT NULL — auto increment
  • 오브제ID (object_id) — BigInt — 외래 키 → 오브제.오브제ID — NOT NULL
  • 유저이메일 (user_email) — Varchar — 외래 키 → 유저.유저ID — NOT NULL
  • 오브제이름 (object_name) — Varchar — NOT NULL
  • 구매날짜 (purchase_day) — DATETIME — NOT NULL — now()

오브제 (objects)

  • 오브제ID (object_id) — BigInt — 기본 키 — NOT NULL — auto increment
  • 파일경로 (object_path) — Varchar — NOT NULL
  • 가격 (object_thing) — BigInt — NOT NULL — 가격이 0이면 언박띵
  • 카테고리 (object_category) — Enum — NOT NULL — Furniture, HomeAppliance, Prop, Floor, SmartThings, UnBoxThing

유저 (users)

  • 유저ID (user_id) — BigInt — 기본 키 — NOT NULL — auto increment
  • auth토큰 (personal_authentication_token) — Varchar
  • 보유띵 (thing_amount) — Integer — NOT NULL — 100띵
  • 닉네임 (nickname) — Varchar — NOT NULL
  • 이메일 (email) — Varchar — NOT NULL — Unique
  • 비밀번호 (password) — Varchar — NOT NULL

유저 방 (user_rooms)

  • 방ID (room_id) — BigInt — 기본 키 — NOT NULL — auto increment
  • 유저ID (user_id) — BigInt — 외래 키 → 유저.유저ID — NOT NULL
  • 방 색상 (room_color) — Varchar — NOT NULL — 벽지 색상

유저_오브제 (user_objects)

  • 유저오브제ID (user_object_id) — BigInt — 기본 키 — NOT NULL — auto increment
  • 오브제ID (object_id) — BigInt — 외래 키 → 오브제.오브제ID — NOT NULL
  • 방 번호 (room_id) — BigInt — 외래 키 → 유저 방.방ID
  • 유저ID (user_id) — BigInt — 외래 키 → 유저.유저ID — NOT NULL
  • 방 내부 위치 (object_location) — BigInt — NOT NULL — 앞으로 어뜨케 될지 보자
  • 상태 (user_object_status) — Enum — NOT NULL — ThingHistory, Room, Shop