-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodels.go
30 lines (27 loc) · 834 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
// this file defines the data structures to be used throught
package main
type Link struct {
LinkID int64 `json:"link_id"`
URL string `json:"url"`
VideoID string `json:"video_id"`
Title string `json:"title"`
ChannelName string `json:"channel_name"`
Duration int64 `json:"duration"`
SubmittedBy string `json:"submitted_by"`
DedicatedTo string `json:"dedicated_to"`
TotalVotes int64 `json:"total_votes"`
MyVote int64 `json:"my_vote"`
IsExpired bool `json:"is_expired"`
CreatedAt int64 `json:"created_at"`
}
type Vote struct {
UserID string `json:"user_id"`
LinkID int64 `json:"link_id"`
Score int `json:"score"`
}
type User struct {
UserID string `json:"user_id"`
FirstName string `json:"firstname"`
LastName string `json:"lastname"`
Email string `json:"email"`
}