hanghae99-SNS

Tables (8)

Messages (메시지)

  • chatId (채팅방 Id) — Primary key — NOT NULL
  • chatId (채팅방 Id2) — Foreign key → Chats.chatId — NOT NULL
  • userId (고유 Id) — Foreign key → Chats.userId — NOT NULL
  • userId (고유 Id2) — Foreign key → Users.userId — NOT NULL
  • content (메세지)
  • created_at (생성 시간)
  • Field (확인여부)

Chats (채팅)

  • chatId (채팅방 Id) — Primary key — NOT NULL
  • userId (고유 Id) — Foreign key → Users.userId — NOT NULL
  • created_at (생성 시간)

Comments (댓글)

  • commentId (댓글 Id) — Primary key — NOT NULL
  • postId (게시글 아이디) — Foreign key → Posts.postId — NOT NULL
  • userId (고유 Id) — Foreign key → Users.userId — NOT NULL
  • content (내용)
  • created_at (생성일)
  • likes (좋아요)

Pet_Info (반려동물 정보)

  • animalId (동물 Id) — Primary key — NOT NULL
  • species (종)
  • breed (품종)
  • image (이미지)
  • feature (특징)

Pets (반려동물)

  • petId (반려동물 Id) — Primary key — NOT NULL
  • userId (고유 Id) — Foreign key → Users.userId — NOT NULL
  • name (이름)
  • age (나이)
  • species (종)
  • breed (품종)
  • image (이미지)

Posts (게시물)

  • postId (게시글 Id) — Primary key — NOT NULL
  • userId (고유 Id) — Foreign key → Users.userId — NOT NULL
  • content (내용)
  • imgae_url (사진)
  • created_at (생성일)
  • likes (좋아요)
  • comments (댓글)

Replies (대댓글)

  • replyId (대댓글 Id) — Primary key — NOT NULL
  • commentId (댓글 Id2) — Foreign key → Comments.commentId — NOT NULL
  • postId (게시글 아이디) — Foreign key → Comments.postId — NOT NULL
  • userId (고유 Id) — Foreign key → Comments.userId — NOT NULL
  • userId (고유 Id2) — Foreign key → Users.userId — NOT NULL
  • content (내용)
  • created_at (생성일)
  • Field3

Users (사용자)

  • userId (고유 Id) — Primary key — NOT NULL
  • email (이메일)
  • username (유저명)
  • profile_image (프로필 이미지)
  • followers (팔로워)
  • following (팔로잉)
  • pets (동물 정보)