-
Notifications
You must be signed in to change notification settings - Fork 0
/
vocabulary.go
55 lines (49 loc) · 1.87 KB
/
vocabulary.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
package mydictionary
const (
// Basic : string for "Status" in "VocabularyAnswerStruct"
Basic = "basic"
// Advance : string for "Status" in "VocabularyAnswerStruct"
Advance = "advance"
// Collection : int for "TableType" in "LocationStruct"
Collection = 1
// Dictionary : int for "TableType" in "LocationStruct"
Dictionary = 2
// Online : int for "TableType" in "LocationStruct"
Online = 3
)
// VocabularyAskStruct : content and option for query
type VocabularyAskStruct struct {
Word string `json:"word"`
Advance bool `json:"advance"`
Online bool `json:"online"`
DoNotRecord bool `json:"doNotRecord"`
}
// VocabularyAnswerStruct : vocabulary, include word, definition, note and other information
type VocabularyAnswerStruct struct {
Word string `json:"word"` // `xlsx:wd`
Definition []string `json:"definition"` // `xlsx:def`
SerialNumber int `json:"serialNumber"` // `xlsx:sn`
QueryCounter int `json:"queryCounter"` // `xlsx:qc`
QueryTime string `json:"queryTime"` // `xlsx:qt`
Note []string `json:"note"` // `xlsx:nt`
SourceName string `json:"sourceName"`
Status string `json:"status"`
Location LocationStruct `json:"location"`
}
// VocabularyResultStruct : set of query result
type VocabularyResultStruct struct {
Basic []VocabularyAnswerStruct `json:"basic"`
Advance []VocabularyAnswerStruct `json:"advance"`
}
// VocabularyEditStruct : editor for definition and note of vocabulary
type VocabularyEditStruct struct {
Location LocationStruct `json:"location"`
Definition string `json:"definition"`
Note string `json:"note"`
}
// LocationStruct : location of vocabulary
type LocationStruct struct {
TableType int `json:"tableType"`
TableIndex int `json:"tableIndex"`
ItemIndex int `json:"itemIndex"`
}