데이터 구조 선택  |  Firestore  |  Firebase


users: {
  uid: {
		uid: string, // 해쉬 id
    email: string,
    displayName: string,
		photoURL: string | null,
		joinedBoxes: string[],
  },
  uid2: {
		uid: string,
    email: string,
    displayName: string,
		photoURL: string | null,
		joinedBoxes: string[],
  }
}
qna_boxs: {
  boxId: {
    boxId: string,
    title: string,
		ownerId: uid, // 관리자 ID
		description: string,
		createdAt: timestamp,
    activation: boolean; // 질문 활성 여부
    anonymous: boolean; // 공개 여부
  }
}

comments: {
  commentId: {
		commentId: commentId,
    boxId: boxId, // 해당 QnA box ID
    authorId: userId,
    content: string,
		likes: number,
    createdAt: timestamp,
    replies: [ // 답변들
      {
        authorId: userId,
        content: string,
        createdAt: timestamp,
        likes: number,
      },
      ...
    ]
  },
}