-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.go
More file actions
40 lines (33 loc) · 1.29 KB
/
models.go
File metadata and controls
40 lines (33 loc) · 1.29 KB
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
package data
// ----------------------------------------------
// tables
// ----------------------------------------------
type Accounts_User struct {
ID int `gorm:"primaryKey;autoIncrement"`
RemoteID string `json:"remote_id" gorm:"column:remote_id"`
Username string `json:"username" gorm:"column:username"`
}
type Event struct {
ID int `gorm:"primaryKey;autoIncrement"`
RemoteID string `json:"remote_id" gorm:"column:remote_id"`
ProfileID int `json:"profile_id" gorm:"column:profile_id"`
Title string `json:"title" gorm:"column:title"`
Values string `json:"event_values" gorm:"column:event_values"`
PatrolSegmentID string `json:"patrol_segment_id" gorm:"column:patrol_segment_id"`
CreatedAt string `json:"created_at" gorm:"created_at"`
UpdatedAt string `json:"updated_at" gorm:"updated_at"`
}
type User_Profile struct {
ID int `gorm:"primaryKey;autoIncrement"`
RemoteID string `json:"remote_id" gorm:"column:remote_id"`
Username string `json:"username" gorm:"column:username"`
}
// ----------------------------------------------
// table configurations
// ----------------------------------------------
type Tabler interface {
TableName() string
}
func (Accounts_User) TableName() string {
return "accounts_user"
}