당근

테이블 (42)

AdPost

  • adPostIdx — int — 기본 키 — NOT NULL
  • location — int — 외래 키 → Address1.address1Idx — NOT NULL
  • title — text — NOT NULL
  • content — text — NOT NULL
  • price — int — NOT NULL
  • phone — varchar(24) — NOT NULL
  • writerIdx — int — 외래 키 → User.userIdx — NOT NULL
  • category — int — 외래 키 → AdPostCategories.categoryIdx — NOT NULL
  • createdAt — timestamp — NOT NULL
  • updatedAt — timestamp
  • status — char(1) — NOT NULL

AdPostCategories

  • categoryIdx — int — 기본 키 — NOT NULL
  • category — varchar(20) — NOT NULL

AdPostChatRoom

  • chatRoomIdx — int — 기본 키 — NOT NULL
  • adPostIdx — int — 외래 키 → AdPost.adPostIdx — NOT NULL
  • createdAt — timestamp — NOT NULL
  • updatedAt — timestamp
  • status — char(1) — NOT NULL

AdPostComment

  • commentIdx — int — 기본 키 — NOT NULL
  • writerIdx — int — 외래 키 → User.userIdx — NOT NULL
  • targetPostIdx — int — 외래 키 → AdPost.adPostIdx
  • text — text — NOT NULL
  • photoIdx — int — 외래 키 → CommentPhoto.photoIdx
  • createdAt — timestamp — NOT NULL
  • updatedAt — timestamp
  • status — char(1) — NOT NULL

AdPostMessage

  • MessageIdx — int — 기본 키 — NOT NULL
  • chatRoomIdx — int — 외래 키 → AdPostChatRoom.chatRoomIdx — NOT NULL
  • senderIdx — int — 외래 키 → User.userIdx — NOT NULL
  • text — text — NOT NULL
  • createdAt — timestamp — NOT NULL
  • updatedAt — timestamp
  • status — char(1) — NOT NULL

AdPostMessagePhoto

  • photoIdx — int — 기본 키 — NOT NULL
  • messageIdx — int — 외래 키 → AdPostMessage.MessageIdx — NOT NULL
  • photo — text — NOT NULL
  • createdAt — timestamp — NOT NULL
  • updatedAt — timestamp
  • status — char(1) — NOT NULL

AdPostPhoto

  • adPostphotoIdx — int — 기본 키 — NOT NULL
  • adPostIdx — int — 외래 키 → AdPost.adPostIdx — NOT NULL
  • photo — text — NOT NULL
  • createdAt — timestamp — NOT NULL
  • updatedAt — timestamp
  • status — char(1) — NOT NULL

AdPostViews

  • adPostIdx — int — 외래 키 → AdPost.adPostIdx — NOT NULL
  • userIdx — int — 외래 키 → User.userIdx — NOT NULL
  • createdAt — timestamp — NOT NULL
  • updatedAt — timestamp
  • count — tinyint — NOT NULL

Address1

  • address1Idx — int — 기본 키 — NOT NULL
  • address2Idx — int — 외래 키 → Address2.address2Idx — NOT NULL
  • name — varchar(16) — NOT NULL

Address2

  • address2Idx — int — 기본 키 — NOT NULL
  • address3Idx — int — 외래 키 → Address3.address3Idx — NOT NULL
  • name — varchar(16) — NOT NULL

Address3

  • address3Idx — int — 기본 키 — NOT NULL
  • address4Idx — int — 외래 키 → Address4.address4Idx — NOT NULL
  • name — varchar(16) — NOT NULL

Address4

  • address4Idx — int — 기본 키 — NOT NULL
  • name — varchar(16) — NOT NULL

Badge

  • badgeIdx — int — 기본 키 — NOT NULL
  • badgeName — varchar(32) — NOT NULL

CommentComment

  • commentIdx — int — 기본 키 — NOT NULL
  • writerIdx — int — 외래 키 → User.userIdx — NOT NULL
  • PostcommentIdx — int — 외래 키 → PostComment.commentIdx — NOT NULL
  • AdPostcommentIdx — int — 외래 키 → AdPostComment.commentIdx — NOT NULL
  • text — text — NOT NULL
  • photoIdx — int — 외래 키 → CommentPhoto.photoIdx
  • createdAt — timestamp — NOT NULL
  • updatedAt — timestamp
  • status — char(1) — NOT NULL

CommentPhoto

  • photoIdx — int — 기본 키 — NOT NULL
  • photo — text — NOT NULL
  • createdAt — timestamp — NOT NULL
  • updatedAt — timestamp
  • status — char(1) — NOT NULL

Deal

  • dealIdx — int — 기본 키 — NOT NULL
  • productIdx — int — 외래 키 → Product.productIdx — NOT NULL
  • buyerIdx — int — 외래 키 → User.userIdx — NOT NULL
  • createdAt — timestamp — NOT NULL
  • updatedAt — timestamp
  • status — char(1) — NOT NULL

DealReview

  • takerIdx — int — 외래 키 → User.userIdx — NOT NULL
  • giverIdx — int — 외래 키 → User.userIdx — NOT NULL
  • dealIdx — int — 외래 키 → Deal.dealIdx — NOT NULL
  • text — text — NOT NULL
  • createdAt — timestamp — NOT NULL
  • updatedAt — timestamp
  • status — char(1) — NOT NULL

Follow

  • followerIdx — int — 외래 키 → User.userIdx — NOT NULL
  • followingIdx — int — 외래 키 → User.userIdx — NOT NULL
  • createdAt — timestamp — NOT NULL
  • updatedAt — timestamp
  • status — char(1) — NOT NULL

Keyword

  • keywordIdx — int — 기본 키 — NOT NULL
  • keyword — varchar(66) — NOT NULL

KeywordUser

  • userIdx — int — 외래 키 → User.userIdx — NOT NULL
  • keywordIdx — int — 외래 키 → Keyword.keywordIdx — NOT NULL
  • createdAt — timestamp — NOT NULL
  • updatedAt — timestamp
  • status — char(1) — NOT NULL

LikeAdPost

  • userIdx — int — 외래 키 → User.userIdx — NOT NULL
  • AdPostIdx — int — 외래 키 → AdPost.adPostIdx — NOT NULL
  • createdAt — timestamp — NOT NULL
  • updatedAt — timestamp
  • status — char(1) — NOT NULL

LikePost

  • userIdx — int — 외래 키 → User.userIdx — NOT NULL
  • postIdx — int — 외래 키 → Post.postIdx — NOT NULL
  • createdAt — timestamp — NOT NULL
  • updatedAt — timestamp
  • status — char(1) — NOT NULL

LikePostCategories

  • userIdx — int — 외래 키 → User.userIdx — NOT NULL
  • pstCategoryIdx — int — 외래 키 → PostCategories.categoryIdx — NOT NULL
  • createdAt — timestamp — NOT NULL
  • updatedAt — timestamp
  • status — char(1) — NOT NULL

LikeProduct

  • userIdx — int — 외래 키 → User.userIdx — NOT NULL
  • productIdx — int — 외래 키 → Product.productIdx — NOT NULL
  • createdAt — timestamp — NOT NULL
  • updatedAt — timestamp
  • status — char(1) — NOT NULL

LikeProductCategories

  • userIdx — int — 외래 키 → User.userIdx — NOT NULL
  • pdtCategoryIdx — int — 외래 키 → ProductCategories.categoryIdx — NOT NULL
  • createdAt — timestamp — NOT NULL
  • updatedAt — timestamp
  • status — char(1) — NOT NULL

Manners

  • takerIdx — int — 외래 키 → User.userIdx — NOT NULL
  • giverIdx — int — 외래 키 → User.userIdx — NOT NULL
  • dealIdx — int — 외래 키 → Deal.dealIdx — NOT NULL
  • categoryIdx — int — 외래 키 → MannersCategories.categoryIdx — NOT NULL
  • createdAt — timestamp — NOT NULL
  • updatedAt — timestamp
  • status — char(1) — NOT NULL

MannersCategories

  • categoryIdx — int — 기본 키 — NOT NULL
  • category — varchar(40) — NOT NULL

Post

  • postIdx — int — 기본 키 — NOT NULL
  • location — int — 외래 키 → Address1.address1Idx — NOT NULL
  • title — text — NOT NULL
  • content — text — NOT NULL
  • writerIdx — int — 외래 키 → User.userIdx — NOT NULL
  • category — int — 외래 키 → PostCategories.categoryIdx — NOT NULL
  • createdAt — timestamp — NOT NULL
  • updatedAt — timestamp
  • status — char(1) — NOT NULL

PostCategories

  • categoryIdx — int — 기본 키 — NOT NULL
  • category — varchar(20) — NOT NULL

PostComment

  • commentIdx — int — 기본 키 — NOT NULL
  • writerIdx — int — 외래 키 → User.userIdx — NOT NULL
  • targetIdx — int — 외래 키 → Post.postIdx — NOT NULL
  • text — text — NOT NULL
  • photoIdx — int — 외래 키 → CommentPhoto.photoIdx
  • createdAt — timestamp — NOT NULL
  • updatedAt — timestamp
  • status — char(1) — NOT NULL

PostPhoto

  • postphotoIdx — int — 기본 키 — NOT NULL
  • postIdx — int — 외래 키 → Post.postIdx — NOT NULL
  • photo — text — NOT NULL
  • createdAt — timestamp — NOT NULL
  • updatedAt — timestamp
  • status — char(1) — NOT NULL

PostViews

  • postIdx — int — 외래 키 → Post.postIdx — NOT NULL
  • userIdx — int — 외래 키 → User.userIdx — NOT NULL
  • ceratedAt — timestamp — NOT NULL
  • updatedAt — timestamp
  • count — tinyint — NOT NULL

Product

  • productIdx — int — 기본 키 — NOT NULL
  • location — int — 외래 키 → Address1.address1Idx — NOT NULL
  • title — text — NOT NULL
  • content — text — NOT NULL
  • Price — int — NOT NULL
  • sellerIdx — int — 외래 키 → User.userIdx — NOT NULL
  • category — int — 외래 키 → ProductCategories.categoryIdx — NOT NULL
  • createdAt — timestamp — NOT NULL
  • updatedAt — timestamp
  • status — char(1) — NOT NULL

ProductCategories

  • categoryIdx — int — 기본 키 — NOT NULL
  • category — varchar(20) — NOT NULL

ProductChatRoom

  • chatRoomIdx — int — 기본 키 — NOT NULL
  • productIdx — int — 외래 키 → Product.productIdx — NOT NULL
  • member — int — 외래 키 → User.userIdx — NOT NULL
  • createdAt — timestamp — NOT NULL
  • updatedAt — timestamp
  • status — char(1) — NOT NULL

ProductMessage

  • messageIdx — int — 기본 키 — NOT NULL
  • chatRoomIdx — int — 외래 키 → ProductChatRoom.chatRoomIdx — NOT NULL
  • senderIdx — int — 외래 키 → User.userIdx — NOT NULL
  • chat — text — NOT NULL
  • createdAt — timestamp — NOT NULL
  • updatedAt — timestamp
  • status — char(1) — NOT NULL

ProductMessagePhoto

  • photoIdx — int — 기본 키 — NOT NULL
  • messegaIdx — int — 외래 키 → ProductMessage.messageIdx — NOT NULL
  • photo — text — NOT NULL
  • createdAt — timestamp — NOT NULL
  • updatedAt — timestamp
  • status — char(1) — NOT NULL

ProductPhoto

  • productphotoIdx — int — 기본 키 — NOT NULL
  • productIdx — int — 외래 키 → Product.productIdx — NOT NULL
  • photo — text — NOT NULL
  • createdAt — timestamp — NOT NULL
  • updatedAt — timestamp
  • status — char(1) — NOT NULL

ProductViews

  • productIdx — int — 외래 키 → Product.productIdx — NOT NULL
  • userIdx — int — 외래 키 → User.userIdx — NOT NULL
  • createdAt — timestamp — NOT NULL
  • updatedAt — timestamp
  • count — tinyint — NOT NULL

User

  • userIdx — int — 기본 키 — NOT NULL
  • userId — varchar(45) — NOT NULL
  • userPw — varchar(60) — NOT NULL
  • userName — varchar(24) — NOT NULL
  • userNickName — varchar(24) — NOT NULL
  • address — int — 외래 키 → Address1.address1Idx — NOT NULL
  • subAddress — int — 외래 키 → Address1.address1Idx
  • createdAt — timestamp — NOT NULL
  • updatedAt — timestamp
  • status — char(1) — NOT NULL

UserBadge

  • userIdx — int — 외래 키 → User.userIdx — NOT NULL
  • badgeIdx — int — 외래 키 → Badge.badgeIdx — NOT NULL
  • createdAt — timestamp — NOT NULL
  • updatedAt — timestamp
  • status — char(1) — NOT NULL

UserPhoto

  • userIdx — int — 외래 키 → User.userIdx — NOT NULL
  • photo — text — NOT NULL
  • createdAt — timestamp — NOT NULL
  • updatedAt — timestamp
  • status — char(1) — NOT NULL