tiki-taka
테이블 (8)
댓글 (comment)
- 댓글 아이디 (comment_id) — int — 기본 키 — NOT NULL — auto increment
- 스토리 카드 아이디 (card_id) — int — 외래 키 → 스토리 카드.스토리 카드 아이디 — NOT NULL — auto increment
- 유저아이디 (user_id) — int — 외래 키 → 사용자 인증.유저아이디 — NOT NULL — auto increment
- 댓글 내용 (comment_text) — text — NOT NULL
- 생성 날짜 (created_at) — datetime — NOT NULL — 행이 생성될 때 자동저장
메세지 (message)
- 메세지 아이디 (message_id) — int — 기본 키 — NOT NULL
- 보낸이 아이디 (sender_id) — int — 외래 키 → 사용자 인증.유저아이디 — NOT NULL — auto increment
- 채팅방 아이디 (room_id) — int — 외래 키 → 채팅방.채팅방 아이디 — NOT NULL — auto increment
- 내용 (content) — Text — NOT NULL
- 생성날짜 (created_at) — datetime — NOT NULL
사용자 기본정보 (userProfile)
- 프로필아이디 (profile_id) — int — 기본 키 — NOT NULL — auto increment
- 유저아이디 (user_id) — int — 외래 키 → 사용자 인증.유저아이디 — NOT NULL — auto increment
- 프로필 사진 (profile_image) — varchar(2048)
- 성별 (gender) — varchar(10)
- 이름 (name) — varchar(20)
- 생일 (birthday) — DATE
- 처음사귄날 (first_date) — DATE
- 앱 이용약관 동의 (agree_app_terms) — tinyint(1) — NOT NULL — 0: false 1: true
- 개인정보 취급방침 동의 (agree_privacy_policy) — tinyint(1) — NOT NULL — 0: false 1: true
- 홈 배경 사진 (home_background_image) — varchar(2048)
- 프로필 배경 사진 (profile_background_image) — varchar(2048)
- 상태 메세지 (profile_message) — varchar(200)
- 채팅방 아이디 (roomId) — int — 외래 키 → 채팅방.채팅방 아이디 — NOT NULL — auto increment
사용자 인증 (userAuth)
- 유저아이디 (user_id) — int — 기본 키 — NOT NULL — auto increment
- 파트너아이디 (partner_id) — int — 외래 키 → 사용자 인증.유저아이디 — auto increment
- 이메일 (email) — varchar(40)
- 이메일 인증번호 (auth_code) — varchar(6)
- 이메일 인증번호 생성날짜 (auth_code_date) — datetime
- 비밀번호 (password) — varchar(1000)
- 초대코드 (invite_code) — varchar(8)
- 초대코드 생성날짜 (invite_code_date) — datetime
- 상대방과 연결 (connect) — tinyint(1) — NOT NULL — 둘 중에 한 명이라도 연결끊기(휴면신청)을 하면, 서로의 계정이 연결이 안되는 상태가 됨
- 임시 비밀번호 (temporary_password) — varchar(1000) — 로그인 정보를 잊은 경우, 이메일로 임시 비밀번호를 발급받음
- 임시 비밀번호 생성날짜 (temporary_password_date) — datetime
- 연결 끊김 날짜 (disconnect_date) — datetime — connect 가 0으로 변경되면, 현재의 날짜와 시간을 '연결 끊김 날짜' 칼럼에 기록함
스토리 카드 (storyCard)
- 스토리 카드 아이디 (card_id) — int — 기본 키 — NOT NULL — auto increment
- 스토리 폴더 아이디 (folder_id) — int — 외래 키 → 스토리 폴더.스토리 폴더 아이디 — NOT NULL — auto increment
- 유저아이디 (user_id) — int — 외래 키 → 사용자 인증.유저아이디 — NOT NULL — auto increment
- 데이터 타입 (data_type) — enum('image', 'text', 'video') — NOT NULL
- 이미지 (image) — varchar(2048)
- 메모 (memo) — text
- 영상 (video) — varchar(1024)
- 영상 썸네일 (video_thumbnail) — varchar(1024)
- 나의 좋아요 (user_good) — tinyint(1) — NOT NULL
- 파트너의 좋아요 (partner_good) — tinyint(1) — NOT NULL
- 생성 날짜 (created_at) — datetime — NOT NULL — 행이 생성될 때 자동저장
- 수정 날짜 (updated_at) — datetime — 행이 수정될 때 자동저장
스토리 폴더 (storyFolder)
- 스토리 폴더 아이디 (folder_id) — int — 기본 키 — NOT NULL — auto increment
- 유저아이디 (user_id) — int — 외래 키 → 사용자 인증.유저아이디 — NOT NULL — auto increment
- 데이터 타입 (data_type) — enum('image', 'text') — NOT NULL
- 대표 이미지 (display_image) — varchar(255)
- 메모 (memo) — text
- 제목 (title) — varchar(20)
- 위치 (location) — varchar(20)
- 생성 날짜 (created_at) — datetime — NOT NULL — 행이 생성될 때 자동저장
- 수정 날짜 (updated_at) — datetime — 행이 수정될때 자동저장
알림 (noti)
- 알림 아이디 (noti_id) — int — 기본 키 — NOT NULL — auto increment
- 유저아이디 (user_id) — int — 외래 키 → 사용자 인증.유저아이디 — NOT NULL — auto increment
- 스토리 폴더 아이디 (folder_id) — int — 외래 키 → 스토리 폴더.스토리 폴더 아이디 — NOT NULL — auto increment
- 스토리 카드 아이디 (card_id) — int — 외래 키 → 스토리 카드.스토리 카드 아이디 — NOT NULL — auto increment
- 댓글 아이디 (comment_id) — int — 외래 키 → 댓글.댓글 아이디 — NOT NULL — auto increment
- 알림 종류 (noti_type) — int — NOT NULL — 알림 종류에 대한 분류가 필요함
- 생성 날짜 (created_at) — datetime — NOT NULL — 행이 생성될 때 자동저장
- 내용 (contents) — varchar — 알림 종류에 따라 패턴을 가짐
- 읽음 여부 (read) — tinyint(1) — NOT NULL — 0: unread 1: read
- 읽은 날짜 (read_date) — timestamp — 행이 수정될 때 자동저장
채팅방 (chatRoom)
- 채팅방 아이디 (room_id) — int — 기본 키 — NOT NULL — auto increment
- 유저1 아이디 (user1_id) — int — 외래 키 → 사용자 인증.유저아이디 — NOT NULL — auto increment
- 유저2 아이디 (user2_id) — int — 외래 키 → 사용자 인증.유저아이디 — NOT NULL — auto increment
- 생성날짜 (created_at) — datetime — NOT NULL