-
Notifications
You must be signed in to change notification settings - Fork 0
/
data.go
129 lines (111 loc) · 3.22 KB
/
data.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
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
117
118
119
120
121
122
123
124
125
126
127
128
129
package types
import (
"time"
)
type (
UUID string
CID string
SubstrateType string
Config struct {
PGHost string
PGUser string
PGPass string
PGPort uint
PGSSL string
}
Note struct {
UUID `json:"id,omitempty"`
Note string `json:"note,omitempty"`
MTime time.Time `json:"mtime,omitempty"`
CTime time.Time `json:"ctime,omitempty"`
}
Photo struct {
UUID `json:"id"`
Filename string `json:"image"`
Notes []Note `json:"notes"`
CTime time.Time `json:"ctime"`
}
Vendor struct {
UUID `json:"id"`
Name string `json:"name"`
Website string `json:"website,omitempty"`
}
Substrate struct {
UUID `json:"id"`
Name string `json:"name"`
Type SubstrateType `json:"type"`
Vendor `json:"vendor"`
Ingredients []Ingredient `json:"ingredients,omitempty"`
}
Ingredient struct {
UUID `json:"id"`
Name string `json:"name"`
}
Strain struct {
UUID `json:"id"`
Species string `json:"species,omitempty"`
Name string `json:"name"`
Vendor `json:"vendor"`
Generation *Generation `json:"generation,omitempty"`
Attributes []StrainAttribute `json:"attributes,omitempty"`
CTime time.Time `json:"ctime"`
}
StrainAttribute struct {
UUID `json:"id"`
Name string `json:"name"`
Value string `json:"value"`
}
Stage struct {
UUID `json:"id"`
Name string `json:"name"`
}
EventType struct {
UUID `json:"id"`
Name string `json:"name"`
Severity string `json:"severity"`
Stage `json:"stage"`
}
Lifecycle struct {
UUID `json:"id"`
Location string `json:"location"`
StrainCost float32 `json:"strain_cost,omitempty"`
GrainCost float32 `json:"grain_cost,omitempty"`
BulkCost float32 `json:"bulk_cost,omitempty"`
Yield float32 `json:"yield,omitempty"`
Count int16 `json:"count,omitempty"`
Gross float32 `json:"gross,omitempty"`
Strain `json:"strain,omitempty"`
GrainSubstrate Substrate `json:"grain_substrate,omitempty"`
BulkSubstrate Substrate `json:"bulk_substrate,omitempty"`
Events []Event `json:"events,omitempty"`
Notes []Note `json:"notes,omitempty"`
MTime time.Time `json:"mtime,omitempty"`
CTime time.Time `json:"ctime"`
}
Event struct {
UUID `json:"id"`
Temperature float32 `json:"temperature"`
Humidity int8 `json:"humidity,omitempty"`
EventType EventType `json:"event_type"`
Photos []Photo `json:"photos,omitempty"`
Notes []Note `json:"notes,omitempty"`
MTime time.Time `json:"mtime"`
CTime time.Time `json:"ctime"`
}
Source struct {
UUID `json:"id"`
Type string `json:"type"`
Lifecycle *Lifecycle `json:"lifecycle,omitempty"`
Strain `json:"strain"`
}
Generation struct {
UUID `json:"id"`
PlatingSubstrate Substrate `json:"plating_substrate"`
LiquidSubstrate Substrate `json:"liquid_substrate"`
Sources []Source `json:"sources,omitempty"`
Events []Event `json:"events,omitempty"`
Notes []Note `json:"notes,omitempty"`
MTime time.Time `json:"mtime"`
CTime time.Time `json:"ctime"`
}
)