실전

테이블 (14)

AudioBook (한 판매자의 오디오북)

  • audioBookId (Key) — Long — 기본 키 — NOT NULL
  • userId (Key2) — Long — 외래 키 → User.userId — NOT NULL
  • bookId (Key3) — Long — 외래 키 → Book.bookId — NOT NULL

AudioFile (음성 파일)

  • audioId (Key) — Long — 기본 키 — NOT NULL
  • audioBookId (Key2) — Long — 외래 키 → AudioBook.audioBookId — NOT NULL
  • bookId (Key3) — Long — 외래 키 → AudioBook.bookId — NOT NULL
  • audioFile (s3경로) — String
  • originName (파일명) — String

AudioFund (음성파일)

  • fundaudioId (Key) — Long — 기본 키 — NOT NULL
  • fundId (Key2) — Long — 외래 키 → Fund.fundId — NOT NULL
  • userId (Key22) — Long — 외래 키 → Fund.userId — NOT NULL
  • bookId (Key3) — Long — 외래 키 → Fund.bookId — NOT NULL
  • fundFile (s3경로) — String
  • originName (파일명) — String

AudioPreview (미리듣기 파일)

  • previewId (Key) — Long — 기본 키 — NOT NULL
  • audioBookId (Key2) — Long — 외래 키 → AudioBook.audioBookId — NOT NULL
  • bookId (Key3) — Long — 외래 키 → AudioBook.bookId — NOT NULL
  • previewFile (s3경로) — String
  • originName (파일명) — String

Book (책)

  • bookId (Key) — Long — 기본 키 — NOT NULL
  • bookImg (책이미지) — String
  • author (저자) — String
  • publisher (출판사) — String
  • title (책이름) — String
  • summary (책소개) — String
  • category (카테고리) — Stirng

BookRequest (Untitled)

  • bookRequestId (Key) — Long — 기본 키 — NOT NULL
  • userId (Key2) — Long — 외래 키 → User.userId — NOT NULL
  • title (제목) — String
  • contents (요청 이유) — String

Comment (후기)

  • commentId (Key) — Long — 기본 키 — NOT NULL
  • userId (Key2) — Long — 외래 키 → User.userId — NOT NULL
  • audioBookId (Key3) — Long — 외래 키 → AudioBook.audioBookId — NOT NULL
  • bookId (Key32) — Long — 외래 키 → AudioBook.bookId — NOT NULL
  • contents (내용) — Stirng

Fund (펀딩 포스트)

  • fundId (Key) — Long — 기본 키 — NOT NULL
  • userId (Key2) — Long — 외래 키 → User.userId — NOT NULL
  • bookId (Key3) — Long — 외래 키 → Book.bookId — NOT NULL
  • content (내용) — String
  • title (제목) — String

FundHeart (펀딩 좋아요)

  • fundHeartId (Key) — Long — 기본 키 — NOT NULL
  • fundId (Key2) — Long — 외래 키 → Fund.fundId — NOT NULL
  • userId (판매자ID) — Long — 외래 키 → Fund.userId — NOT NULL
  • bookId (Key3) — Long — 외래 키 → Fund.bookId — NOT NULL
  • userId (사용자ID) — Long — 외래 키 → User.userId — NOT NULL

Heart (찜)

  • heartId (Key) — Long — 기본 키 — NOT NULL
  • userId (Key2) — Long — 외래 키 → User.userId — NOT NULL
  • audioBookId (Key3) — Long — 외래 키 → AudioBook.audioBookId — NOT NULL

Timestamped (객체 생성, 수정 시간)

  • CreatedAt (생성날짜) — String
  • ModifiedAt (수정날짜) — String

User (사용자, 판매자 , 관리자)

  • userId (Key) — Long — 기본 키 — NOT NULL
  • username (사용자아이디) — String
  • password (비밀번호) — String
  • email (이메일) — Stirng
  • role (권한) — UserEnum
  • userImage (s3경로) — Stirng
  • originImage (이미지파일명) — String
  • kakaoId (카카오로그인유저) — Long

UserEnum (user 별 권한)

  • USER (사용자) — String
  • SELLER (판매자) — String
  • ADMIN (관리자) — String

UserProfile (프로필)

  • Key — 기본 키 — NOT NULL
  • userId (Key2) — Long — 외래 키 → User.userId — NOT NULL
  • originImage (이미지파일명) — String
  • userImage (S3경로) — String
  • introduce (자기소개) — String