/
models.go
68 lines (56 loc) · 1.27 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
package site
import (
"time"
"github.com/kapmahc/sky/web"
)
// LeaveWord leave-word
type LeaveWord struct {
ID uint `gorm:"primary_key" json:"id"`
CreatedAt time.Time `json:"createdAt"`
Body string `json:"body"`
Type string `json:"type"`
}
// TableName table name
func (LeaveWord) TableName() string {
return "leave_words"
}
// Link link
type Link struct {
web.Model
Loc string `json:"loc"`
Href string `json:"href"`
Label string `json:"label"`
SortOrder int `json:"sortOrder"`
}
// TableName table name
func (Link) TableName() string {
return "links"
}
// Card card
type Card struct {
web.Model
Loc string `json:"loc"`
Title string `json:"title"`
Summary string `json:"summary"`
Type string `json:"type"`
Href string `json:"href"`
Logo string `json:"logo"`
SortOrder int `json:"sortOrder"`
Action string `json:"action"`
}
// TableName table name
func (Card) TableName() string {
return "cards"
}
// FriendLink friend_links
type FriendLink struct {
web.Model
Title string `json:"title"`
Home string `json:"home"`
Logo string `json:"logo"`
SortOrder int `json:"sortOrder"`
}
// TableName table name
func (FriendLink) TableName() string {
return "friend_links"
}