コンテンツにスキップ

Firestoreのデータベース構成

データ保存方法について

イベント

コレクション名: events

フィールド タイプ
title string タイトル
date timestamp 実施日
location string 場所
outline string 説明
thumbnailImageUrl string サムネイル写真のURL
statusId int 状態を示す
applications array 下のオブジェクトに従う
alert map(アラート) 下のアラートオブジェクトに従う

thumbnailImageUrlは、Firestoreの場合はDownloadURLを入れておく。

オブジェクト(アラート)

フィールド タイプ
isPublic bool true or false(表示する際にtrue / defaultはfalse)
text string アラートの内容

オブジェクト(登録)

フィールド タイプ
isPublic bool true or false(表示する際にtrue / defaultはfalse)
startPublic timestamp 公開開始日時
text string 原則的にはURLを想定

statusのIDとの対応表

ID 状態
0 通常(デフォルト)
1 終了
2 満員
3 延期(日時確定前)
4 延期(日時確定後)
5 中止