Firebase Auth, FireStore로 구현된 데이터베이스 스키마 개요

Flowchart Maker & Online Diagram Software
Firebase Authentication
<aside>
📄 Authentication
Identifier(email): 유저가 회원가입 할 때 인증한 나라사랑 이메일 주소, 유저 고유식별자user_uid: 계정 생성시 자동 생성되는 유저 고유 식별 IDcreated_at: 계정을 생성한 시간last_signed_in: 유저가 마지막으로 로그인한 시간email_verified : 이메일 인증 여부, 기본 값 falsedisplay_name : 유저 닉네임photo_url : 유저 프로필 사진 URL, 기본 값 null
</aside>Firestore Database
<aside>
📄 User : 유저 정보 컬렉션
user_uid: 유저 고유 식별 ID, **Authentication**의 **user_uid**와 동일하다.nickname (string):유저 닉네임profileImg (string): 유저 프로필 사진 URL, 기본 값 nulladmin (boolean): 관리자 여부, 기본 값 false
</aside><aside>
📄 WorryPost: 고민 포스트 정보 컬렉션
post_id: 고민 포스트 고유 식별 IDcreator_id (string): 포스트를 작성한 유저의 고유 식별 IDcreated_timestamp (timestamp) : 포스트 생성 시각text (string): 포스트 본문 텍스트post_report (boolean): 포스트 신고 유무, 기본 값 falsepost_rep_accept (boolean): 포스트 블라인드 유무, 기본 값 falsereport_timestamp (timestamp): 포스트 신고 시간, 기본 값 nulllike_count (number): 포스트 공감 수, 기본 값 0comment_count (number): 포스트 댓글 수, 기본 값 0tag_name (string): 태그 이름
</aside><aside>
📄 Comment: 댓글 정보 컬렉션
comment_id: 댓글 고유 식별 IDcommentor_id (string): 댓글 작성한 유저의 고유 식별 IDcreated_timestamp (timestamp): 댓글 생성 시간associated_post_id (string): 고민 포스트 고유 식별 IDcomment_text (string): 댓글 본문 텍스트comment_report (boolean): 댓글 신고 유무, 기본 값 falsecomment_rep_accept (boolean): 댓글 블라인드 유무, 기본 값 falsereport_timestamp (timestamp): 댓글 신고 시간, 기본 값 nulllike_count (number): 댓글 공감 수, 기본 값 0
</aside><aside>
📄 ChatPair: 1대1 채팅방 정보 컬렉션
pair_id: 채팅방 고유 식별 IDcreated_timestamp (timestamp): 채팅방이 생성된 시간is_report_and_block (boolean): 채팅방 차단한 유저의 고유 식별 IDmember_ids (array): 채팅방 참여하는 유저들의 고유 식별 IDrecentMessage (map): 채팅방의 마지막(최근) 메시지 정보을 저장하는 **(map)**타입 필드
message_text (string): 마지막 메시지의 텍스트sent_timestamp (timestamp): 마지막 메시지 전송 시간sent_by (string) : 마지막 메시지를 보낸 유저의 고유 식별 IDread_by (array): 마지막 메시지 읽은 유저들의 고유식별 IDChatMessage : ChatPair의 서브컬렉션, 해당 채팅방의 메시지 정보
chat_message_id: 메시지 고유 식별 IDmessage_text (string): 메시지의 텍스트sent_timestamp (timestamp): 메시지 전송 시간sent_by (string): 메시지 보낸 유저의 고유 식별 ID
</aside><aside>
📄 postLike: 포스트 공감 정보 컬렉션
postLike_id: 포스트 공감 고유 식별 IDassociated_post_id (string): 고민 포스트 고유 식별 IDuser_id (string): 포스트 공감한 유저의 고유 식별 IDcreated_timestamp (timestamp): 포스트 공감 생성 시간
</aside><aside>
📄 comment**Like:** 댓글 공감 정보 컬렉션
commentLike_id: 댓글 공감 고유 식별 IDassociated_comment_id (string): 댓글 고유 식별 IDuser_id (string): 댓글 공감한 유저의 고유 식별 IDcreated_timestamp (timestamp): 댓글 공감 생성 시간
</aside><aside>
📄 Tag: 태그 정보 컬렉션
tag_id: 태그 고유 식별 IDtag_name **(string)**: 태그 이름tag_count (number): 해당 태그를 사용한 포스트 수, 기본 값 : 1
</aside>