-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.go
37 lines (31 loc) · 819 Bytes
/
types.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 fitbit_pgdb
import (
"time"
"github.com/galeone/fitbit/v2/types"
)
// AuthorizedUser wraps fitbit types.AuthorizedUser
// and adds:
// - The igor-required method TableName()
// - The primary key
// - The created at field
type AuthorizedUser struct {
types.AuthorizedUser
ID int64 `igor:"primary_key"`
CreatedAt time.Time `sql:"default:now()"`
}
func (AuthorizedUser) TableName() string {
return "oauth2_authorized"
}
// AuthorizingUser wraps fitbit types.AuthorizingUser
// and adds:
// - The igor-required method TableName()
// - The primary key
// - The created at field
type AuthorizingUser struct {
types.AuthorizingUser
ID int64 `igor:"primary_key"`
CreatedAt time.Time `sql:"default:now()"`
}
func (AuthorizingUser) TableName() string {
return "oauth2_authorizing"
}