-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.go
81 lines (72 loc) · 3.22 KB
/
models.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
78
79
80
81
package es
import (
"gopkg.in/olivere/elastic.v5"
"github.com/Bnei-Baruch/archive-backend/utils"
)
type EffectiveDate struct {
EffectiveDate *utils.Date `json:"effective_date"`
}
type ClassificationIntent struct {
MDB_UID string `json:"mdb_uid"`
Name string `json:"name"`
Score *float64 `json:"score,omitempty"`
Explanation elastic.SearchExplanation `json:"explanation,omitempty"`
MaxScore *float64 `json:"max_score,omitempty"`
MaxExplanation elastic.SearchExplanation `json:"max_explanation,omitempty"`
}
type Collection struct {
MDB_UID string `json:"mdb_uid"`
TypedUIDs []string `json:"typed_uids"`
Name string `json:"name"`
Description string `json:"description"`
ContentType string `json:"content_type"`
ContentUnitsContentTypes []string `json:"content_units_content_types,omitempty"`
EffectiveDate *utils.Date `json:"effective_date"`
OriginalLanguage string `json:"original_language,omitempty"`
}
type ContentUnit struct {
MDB_UID string `json:"mdb_uid"`
TypedUIDs []string `json:"typed_uids"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
ContentType string `json:"content_type"`
CollectionsContentTypes []string `json:"collections_content_types,omitempty"`
EffectiveDate *utils.Date `json:"effective_date,omitempty"`
Duration uint64 `json:"duration,omitempty"`
OriginalLanguage string `json:"original_language,omitempty"`
Translations []string `json:"translations,omitempty"`
Tags []string `json:"tags,omitempty"`
Sources []string `json:"sources,omitempty"`
Authors []string `json:"authors,omitempty"`
Persons []string `json:"persons,omitempty"`
Transcript string `json:"transcript,omitempty"`
}
type File struct {
MDB_UID string `json:"mdb_uid"`
Name string `json:"name"`
Size uint64 `json:"size"`
URL string `json:"url"`
Secure int `json:"secure"`
FilmDate *utils.Date `json:"film_date"`
Duration float64 `json:"duration,omitempty"`
Language string `json:"language,omitempty"`
MimeType string `json:"mimetype,omitempty"`
Type string `json:"type,omitempty"`
SubType string `json:"subtype,omitempty"`
}
type Classification struct {
MDB_UID string `json:"mdb_uid"`
Name string `json:"name,omitempty"`
NameSuggest string `json:"name_suggest,omitempty"`
Description string `json:"description,omitempty"`
DescriptionSuggest string `json:"description_suggest,omitempty"`
Type string `json:"classification_type"`
}
type Source struct {
MDB_UID string `json:"mdb_uid"`
Name string `json:"name"`
Description string `json:"description"`
Authors []string `json:"authors,omitempty"`
Content string `json:"content"`
Sources []string `json:"sources"`
}