simple-sns

Tables (13)

ALARMS (알람)

  • alaram_id (알람 구분 코드) — Integer — Primary key — NOT NULL
  • user_id (유저 구분 코드) — Integer — Foreign key → USER.user_id — NOT NULL
  • create_date (생성 날짜) — datetime
  • type (알람 종류) — smallint
  • target_id (요청자 구분 코드) — Integer

CHATS (채팅 내역)

  • chat_id (채팅 구분코드) — Integer — Primary key — NOT NULL
  • sender_id (송신자 구분코드) — Integer — Foreign key → USER.user_id — NOT NULL
  • receiver_id (수신자 구분 코드) — Integer — Foreign key → USER.user_id — NOT NULL
  • chat_room_id (채팅방 구분 코드) — Integer — Foreign key → CHAT_ROOM.chat_room_id — NOT NULL
  • content (채팅 내용) — Text
  • creat_date (생성 일자) — datetime
  • read_date (읽은 일자) — datetime
  • is_read (읽은지 확인) — boolean

CHAT_ROOM (채팅방)

  • chat_room_id (채팅방 구분 코드) — Integer — Primary key — NOT NULL
  • name (채팅방 이름) — varchar(50)

COMMENT (댓글)

  • comment_id (댓글 구분 코드) — Integer — Primary key — NOT NULL
  • posting_id (포스팅 구분 코드) — Integer — Foreign key → POSTING.posting_id — NOT NULL
  • user_id (유저 구분 코드) — Integer
  • content (댓글 내용) — Text

FOLLOWER (팔로워)

  • follower_id (팔로워 구분 코드) — Integer — Primary key — NOT NULL
  • user_id (유저 구분 코드) — Integer — Foreign key → USER.user_id — NOT NULL
  • follower_user_id (팔로워 유저 구분 코드) — Integer
  • follower_status (팔로워 상태) — smallint

LIKE_PEOPLE (좋아요 누른 사람)

  • like_people_id (좋아요 사람 구분 코드) — Integer — Primary key — NOT NULL
  • like_id (좋아요 구분 코드) — Integer — Foreign key → Like.like_id — NOT NULL
  • user_id (유저 구분 코드) — Integer

Like (좋아요)

  • like_id (좋아요 구분 코드) — Integer — Primary key — NOT NULL
  • posting_id (포스팅 구분 코드) — Integer — Foreign key → POSTING.posting_id — NOT NULL
  • like_count (좋아요 갯수) — Integer

POSTING (게시글)

  • posting_id (포스팅 구분 코드) — Integer — Primary key — NOT NULL
  • user_id (유저 구분 코드) — Integer — Foreign key → USER.user_id — NOT NULL
  • content (본문 내용) — Text
  • created_date (생성 날짜) — DateTime

POSTING_IMAGE (포스팅 이미지)

  • posting_image_id (Key) — Integer — Primary key — NOT NULL
  • posting_id (포스팅 구분 코드) — BigInt — Foreign key → POSTING.posting_id — NOT NULL
  • posting_image_path (사진 저장 경로) — varchar(100)

PROFILE_IMAGE (프로필 사진)

  • profile_image_id (프로필 사진 구분 코드) — Integer — Primary key — NOT NULL
  • user_id (유저 구분 코드) — Integer — Foreign key → USER.user_id — NOT NULL
  • profile_image_path (사진 저장 경로) — varchar(100)

PROFILE_MESSAGE (프로필 상태 메세지)

  • profile_message_id (프로필 메세지 구분 코드) — Integer — Primary key — NOT NULL
  • user_id (유저 구분 코드) — Integer — Foreign key → USER.user_id — NOT NULL
  • message_content (프로필 메세지 내용) — TinyText

USER (유저)

  • user_id (유저 구분 코드) — Integer — Primary key — NOT NULL
  • id (유저 아이디) — varchar(20)
  • password (비밀번호) — varchar(30)
  • nickname (닉네임) — varchar(20)
  • email (이메일) — varchar(80)
  • birth_year (생년월일_년) — SmallInt
  • birth_month (생년월일_달) — TinyInt
  • birth_day (생년월일_일) — TinyInt
  • name (이름) — varchar(30)

user_chat_room (유저_채팅방)

  • user_id (유저 구분 코드) — Integer — Foreign key → USER.user_id — NOT NULL
  • chat_room_id (채팅방 구분 코드) — Integer — Foreign key → CHAT_ROOM.chat_room_id — NOT NULL