Firestore 設計 => コード自動生成のサンプル yaml
Name |
Description |
Path |
Social |
ソーシャル機能を管理 |
/social |
Master |
マスター管理 |
/master |
AppService |
アプリシステムの状態 |
/appService |
Name |
Description |
Path |
Poster |
投稿者の情報 |
/social/${socialId}/posters/${posterId} |
Post |
投稿情報 |
/social/${socialId}/posters/${posterId}/posts/${postId} |
Like |
いいね |
/social/${socialId}/posters/${posterId}/posts/${postId}/likes/${likeId} |
Color |
カラー情報 |
/master/${masterId}/colors/${colorId} |
Maintenance |
メンテナンス情報 |
/appService/${appServiceId}/maintenance/${maintenanceId} |
投稿者の情報
/social/${socialId}/posters/${posterId}
Name |
Type |
Example |
id |
string |
DocumentId |
name |
string,nullable |
ケン |
age |
int,nullable |
|
image |
map,nullable,ThumbnailImage |
|
createdAt |
timestamp,nullable |
2021-09-16T13:10:52+09:00 |
updatedAt |
timestamp,nullable |
2021-09-16T13:10:52+09:00 |
CollectionName |
Type |
Example |
posts |
Post |
投稿情報 |
投稿情報
/social/${socialId}/posters/${posterId}/posts/${postId}
Name |
Type |
Example |
title |
string,nullable |
タイトル |
text |
string,nullable |
テキスト内容 |
likeCount |
int,nullable |
10 |
stars |
double,nullable |
4.5 |
isBookmark |
bool,nullable |
true |
createdAt |
timestamp,nullable |
2021-09-16T13:10:52+09:00 |
updatedAt |
timestamp,nullable |
2021-09-16T13:10:52+09:00 |
CollectionName |
Type |
Example |
likes |
Like |
いいね |
いいね
/social/${socialId}/posters/${posterId}/posts/${postId}/likes/${likeId}
Name |
Type |
Example |
id |
string |
DocumentId |
name |
string,nullable |
ケン |
age |
int,nullable |
|
image |
map,nullable,ThumbnailImage |
|
createdAt |
timestamp,nullable |
2021-09-16T13:10:52+09:00 |
updatedAt |
timestamp,nullable |
2021-09-16T13:10:52+09:00 |
※ dataReference: Poster
カラー情報
/master/${masterId}/colors/${colorId}
Name |
Type |
Example |
codes |
string,array,nullable |
['000000', 'FFFFFF'] |
メンテナンス情報
/appService/${appServiceId}/maintenance/${maintenanceId}
Name |
Type |
Example |
status |
string |
active |
createdAt |
timestamp,nullable |
2021-09-16T13:10:52+09:00 |
updatedAt |
timestamp,nullable |
2021-09-16T13:10:52+09:00 |
Name |
Description |
ThumbnailImage |
画像情報 |
画像情報
Name |
Type |
Example |
url |
string |
https://sample/image.jpg |
path |
string |
/social/${socialId}/users/${userId}/images/${imageId} |