-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.go
37 lines (33 loc) · 873 Bytes
/
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
package main
type User struct {
ID int `json:"id"`
Username string `json:"username"`
}
type Stock struct {
ID int `json:"id"`
Symbol string `json:"symbol"`
Name string `json:"name"`
Price float32 `json:"price"`
TotalShares int `json:"total_shares"`
}
type Orders struct {
ID int `json:"id"`
Username string `json:"username"`
Symbol string `json:"symbol"`
Shares int `json:"shares"`
}
type Config struct {
Server struct {
Port string `yaml:"port"`
Host string `yaml:"host"`
Certificate string `yaml:"server_cert"`
Key string `yaml:"server_key"`
} `yaml:"server"`
Database struct {
Name string `yaml:"name"`
Host string `yaml:"host"`
Port string `yaml:"port"`
Username string `yaml:"user"`
Password string `yaml:"pass"`
} `yaml:"database"`
}