-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdb.yaml
116 lines (116 loc) · 3.1 KB
/
db.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
fdmd: 1.0.0
info:
title: Firestore Data Modeling
description: Firestore設計 => コード自動生成のサンプルyaml
version: '1.0.0'
termsOfService: https://github.com/hukusuke1007
contact:
email: [email protected]
license:
name: xxx
url: https://github.com/hukusuke1007
domains:
- name: Social
description: ソーシャル機能を管理
path: /social
- name: Master
description: マスター管理
path: /master
- name: AppService
description: アプリシステムの状態
path: /appService
docs:
- name: Poster
description: 投稿者の情報
path: /social/${socialId}/posters/${posterId}
codeGenerate: true
data:
- field: id
type: string
example: DocumentId
- field: name
type: string,nullable
example: ケン
- field: age
type: int,nullable
example: 10
- field: image
type: map,nullable
map:
reference: ThumbnailImage
- field: createdAt
type: timestamp,nullable
example: '2021-09-16T13:10:52+09:00'
- field: updatedAt
type: timestamp,nullable
example: '2021-09-16T13:10:52+09:00'
collections:
- field: posts
type: Post
- name: Post
description: 投稿情報
path: /social/${socialId}/posters/${posterId}/posts/${postId}
codeGenerate: true
data:
- field: title
type: string,nullable
example: タイトル
- field: text
type: string,nullable
example: テキスト内容
- field: likeCount
type: int,nullable
example: 10
- field: stars
type: double,nullable
example: 4.5
- field: isBookmark
type: bool,nullable
example: true
- field: createdAt
type: timestamp,nullable
example: '2021-09-16T13:10:52+09:00'
- field: updatedAt
type: timestamp,nullable
example: '2021-09-16T13:10:52+09:00'
collections:
- field: likes
type: Like
- name: Like
description: いいね
path: /social/${socialId}/posters/${posterId}/posts/${postId}/likes/${likeId}
codeGenerate: true
dataReference: Poster
- name: Color
description: カラー情報
path: /master/${masterId}/colors/${colorId}
codeGenerate: true
data:
- field: codes
type: string,array,nullable
example: ['000000', 'FFFFFF']
- name: Maintenance
description: メンテナンス情報
path: /appService/${appServiceId}/maintenance/${maintenanceId}
codeGenerate: true
data:
- field: status
type: string
example: active
- field: createdAt
type: timestamp,nullable
example: '2021-09-16T13:10:52+09:00'
- field: updatedAt
type: timestamp,nullable
example: '2021-09-16T13:10:52+09:00'
maps:
- name: ThumbnailImage
description: 画像情報
codeGenerate: true
data:
- field: url
type: string
example: https://sample/image.jpg
- field: path
type: string
example: /social/${socialId}/users/${userId}/images/${imageId}