C3S1

Tables (24)

Account (계정 정보)

  • index (primary key) — int — Primary key — NOT NULL
  • userIdx (유저 인덱스) — int — Foreign key → User.userId — NOT NULL
  • method (로그인 방식 구분자) — String
  • id (유저 구분자) — String
  • password (비밀번호(option)) — String

Address (배송지)

  • addressId (primary key) — int — Primary key — NOT NULL
  • userIdx (유저 인덱스) — int — Foreign key → User.userId — NOT NULL
  • address (주소) — String
  • detailAddress (세부 주소) — String
  • category (카테고리) — String

Chatting (채팅)

  • chatIdx (채팅 인덱스) — int — Primary key — NOT NULL
  • chatRoomIdx (채팅방 인덱스) — int — Foreign key → ChattingRoom.chatRoomId — NOT NULL
  • userId (유저 인덱스) — int — Foreign key → User.userId — NOT NULL
  • message (채팅 메시지) — String
  • createdAt (생성 일시) — Datetime

ChattingRoom (채팅방)

  • chatRoomId (채팅방 인덱스) — int — Primary key — NOT NULL
  • togetherId (공동구매 아이디) — int — Foreign key → Together.togetherId — NOT NULL
  • productId (상품 아이디) — int — Foreign key → Product.productId — NOT NULL
  • category (중고/공동구매 구분자) — String

ChattingRoomUser (채팅방 유저)

  • chatRoomUserIdx (채팅방 유저 인덱스) — int — Primary key — NOT NULL
  • userIdx (유저 인덱스) — int — Foreign key → User.userId — NOT NULL
  • chatRoomIdx (채팅방 인덱스) — int — Foreign key → ChattingRoom.chatRoomId — NOT NULL
  • isLeader (주최자 유저 인덱스) — bool

Child (자녀정보)

  • childId (자녀 아이디) — int — Primary key — NOT NULL
  • userIdx (유저 인덱스) — int — Foreign key → User.userId — NOT NULL
  • name (자녀 이름) — String
  • gender (성별) — String
  • age (나이) — int
  • tag (태그) — String
  • childImg (프로필 사진 링크) — String

Comment (댓글)

  • commentId (댓글 인덱스) — int — Primary key — NOT NULL
  • postId (포스트 인덱스) — int — Foreign key → Post.postId — NOT NULL
  • userIdx (유저 인덱스) — int — Foreign key → User.userId — NOT NULL
  • comment (댓글 본문) — String
  • createAt (생성 일시) — Datetime
  • updateAt (수정 일시) — Datetime
  • state (댓글 상태) — String

Following (팔로잉)

  • followingId (팔로잉 아이디) — int — Primary key — NOT NULL
  • userIdx (유저 인덱스) — int — Foreign key → User.userId — NOT NULL
  • followIdx (팔로우하는 유저) — int

Order (주문 내역)

  • orderId (primary key) — long — Primary key — NOT NULL
  • userId (유저 인덱스) — int — Foreign key → User.userId — NOT NULL
  • productId (상품 아이디) — int — Foreign key → Product.productId — NOT NULL
  • togetherId (공동구매 인덱스) — int — Foreign key → Together.togetherId — NOT NULL
  • createdAt (거래일자) — DateTime

Participants (공동구매 참여자)

  • idx (primary key) — int — Primary key — NOT NULL
  • userIdx (유저 인덱스) — int — Foreign key → User.userId — NOT NULL
  • togetherId (공동구매 상품 아이디) — int — Foreign key → Together.togetherId — NOT NULL
  • purchaseNum (상품 구매 개수) — int

Post (게시판)

  • postId (포스트 인덱스) — int — Primary key — NOT NULL
  • userIdx (유저 인덱스) — int — Foreign key → User.userId — NOT NULL
  • title (제목) — String
  • content (본문) — String
  • view (조회 수) — int
  • createdAt (생성 일시) — Datetime
  • updatedAt (수정 일시) — Datetime
  • state (게시물 상태) — String

PostImage (게시물 이미지)

  • postImgId (포스트 이미지 인덱스) — int — Primary key — NOT NULL
  • postId (포스트 인덱스) — int — Foreign key → Post.postId — NOT NULL
  • imgUrl (이미지 url) — String
  • order (이미지 순서) — int

Product (상품)

  • productId (상품 아이디) — int — Primary key — NOT NULL
  • userId (유저 인덱스) — int — Foreign key → User.userId — NOT NULL
  • productName (상품명) — String
  • price (상품 가격) — int
  • content (상품 설명) — String
  • state (상태) — String
  • productState (상품 상태) — String
  • createAt (상품 등록일) — DateTime
  • updateAt (상품 수정일) — DateTime
  • mainCategory (메인 카테고리) — String
  • subCategory (세부 카테고리) — String

ProductHeart (일반상품 찜)

  • heartIdx (primary key) — int — Primary key — NOT NULL
  • productId (상품 아이디) — int — Foreign key → Product.productId — NOT NULL
  • userIdx (유저 인덱스) — int — Foreign key → User.userId — NOT NULL

ProductImage (상품 이미지)

  • imageId (primary key) — int — Primary key — NOT NULL
  • productId (상품 아이디) — int — Foreign key → Product.productId — NOT NULL
  • imageUrl (상품 이미지 링크) — String
  • imageOrder (이미지 순서) — int

ProductReview (일반 상품 후기)

  • ProductReviewId (리뷰 아이디) — int — Primary key — NOT NULL
  • userIdx (유저 인덱스) — int — Foreign key → User.userId — NOT NULL
  • productId (상품 아이디) — int — Foreign key → Product.productId — NOT NULL
  • score (별점) — int
  • content (후기 내용) — string
  • createdAt (후기 작성일) — DateTime
  • updatedAt (후기 수정일) — DateTime
  • type (리뷰 상품 타입) — string

ProductTag (상품 태그)

  • productTagId (상품 태그 인덱스) — int — Primary key — NOT NULL
  • productId (상품 아이디) — int — Foreign key → Product.productId — NOT NULL
  • tagId (태그 인덱스) — int — Foreign key → Tag.tagId — NOT NULL

Tag (태그)

  • tagId (태그 인덱스) — int — Primary key — NOT NULL
  • tag (태그) — String

Together (공동구매)

  • togetherId (공동구매 인덱스) — int — Primary key — NOT NULL
  • userIdx (유저 인덱스) — int — Foreign key → User.userId — NOT NULL
  • togetherName (공동구매 상품명) — String
  • totalPrice (상품 총 가격) — int
  • details (상품 설명) — MEDIUMTEXT
  • mainCategory (메인 카테고리) — String
  • subCategory (세부 카테고리) — String
  • age (나이) — String
  • link (판매링크) — String
  • deadline (마감기한) — Datetime
  • address (도로명주소) — String
  • detailAddress (세부주소) — String
  • createAt (생성 일시) — Datetime
  • updateAt (수정 일시) — Datetime
  • totalNum (목표 개수) — int
  • soldNum (판매 개수) — int
  • participantNum (참여자 수) — int

TogetherHeart (공동구매 찜)

  • idx (primary key) — int — Primary key — NOT NULL
  • userIdx (유저 인덱스) — int — Foreign key → User.userId — NOT NULL
  • togetherId (공동구매 상품 아이디) — int — Foreign key → Together.togetherId — NOT NULL

TogetherImage (공동구매 이미지)

  • imgIdx (이미지 인덱스) — int — Primary key — NOT NULL
  • togetherId (공동구매 상품 아이디) — int — Foreign key → Together.togetherId — NOT NULL
  • imgUrl (이미지 url) — string
  • order (이미지 순서) — int

TogetherReview (공동구매 후기)

  • TogetherReviewId (리뷰 아이디) — int — Primary key — NOT NULL
  • userIdx (유저 인덱스) — int — Foreign key → User.userId — NOT NULL
  • togetherId (공동구매 인덱스) — int — Foreign key → Together.togetherId — NOT NULL
  • score (별점) — int
  • content (후기 내용) — string
  • createdAt (후기 작성일) — DateTime
  • updatedAt (후기 수정일) — DateTime
  • type (리뷰 상품 타입) — string

TogetherTag (공동구매 태그)

  • togetherTagIdx (공동구매 태그 인덱스) — int — Primary key — NOT NULL
  • togetherId (공동구매 인덱스) — int — Foreign key → Together.togetherId — NOT NULL
  • tagId (태그 인덱스) — int — Foreign key → Tag.tagId — NOT NULL

User (유저 정보)

  • userId (유저 인덱스) — int — Primary key — NOT NULL
  • nickName (닉네임) — String
  • introduce (한 줄 소개) — String
  • profileImg (프로필 이미지 링크) — String
  • phoneNum (휴대폰 번호) — String
  • region (내 동네 - 시) — String
  • town (내 동네 - 군/구) — String
  • createAt (계정 생성일) — Datetime
  • updateAt (계정 업데이트 일) — Datetime
  • state (계정 상태) — String
  • totalScore (받은 리뷰 별점 총합) — int
  • scoreNum (받은 리뷰 개수) — int
  • password (비밀번호) — String
  • email (이메일) — String