-
Notifications
You must be signed in to change notification settings - Fork 0
/
model.go
77 lines (68 loc) · 1.95 KB
/
model.go
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
package dragonformula
import (
"time"
)
type Question struct { // key = 自動生成
Content string `datastore:",noindex"`
LargeCategoryKey string
MediumCategoryKey string
SmallCategoryKey string
Rubric string `datastore:",noindex"`
Percentage float64
Status string // 依頼(REVIEW),最終確認(FINALCHECK),承認(APPROVED),取り下げ(TURNDOWN)
Level string
UserKey string // 作成者
// ignored entirely by the datastore.
Key int64 `datastore:"-"`
Choice1 QuestionChoice `datastore:"-"`
Choice2 QuestionChoice `datastore:"-"`
Choice3 QuestionChoice `datastore:"-"`
Annotations []QuestionAnnotation `datastore:"-"`
}
type QuestionChoice struct { // key = 自動採番
Content string `datastore:",noindex"`
QuestionKeyId int64
TrueFalse bool
// ignored entirely by the datastore.
Key int64 `datastore:"-"`
}
type QuestionAnnotation struct { // key = 自動採番
QuestionKeyId int64
CardName string
Annotation string `datastore:",noindex"`
// ignored entirely by the datastore.
Key int64 `datastore:"-"`
}
type Comment struct { // key = 自動採番
QuestionKey string
Status string // 閲覧権限
UserKey string // 発言者
CreatedAt time.Time
}
type Category struct { // key = カテゴリ英名
Key string
Name string
Type int
ParentKey string
Number float64
}
type User struct { // key = ユーザID
Key string
Id string
Token string
Authority int
}
type UserAnswer struct { // key = ユーザID_タイムスタンプ
UserKey string
TimeStamp string
CategoryKey string
RightAnswer int // 正答数
WrongAnswer int // 誤答数
}
type UserAnswerDetail struct { // key = ユーザID_タイムスタンプ_問番号
UerAnswerKey string
UserKey string
QuestionKey string
CategoryKey string
Corrected bool
}