forked from pocketbase/pocketbase
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrequest.go
30 lines (24 loc) · 832 Bytes
/
request.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
package models
import "github.com/pocketbase/pocketbase/tools/types"
var _ Model = (*Request)(nil)
// list with the supported values for `Request.Auth`
const (
RequestAuthGuest = "guest"
RequestAuthAdmin = "admin"
RequestAuthRecord = "auth_record"
)
type Request struct {
BaseModel
Url string `db:"url" json:"url"`
Method string `db:"method" json:"method"`
Status int `db:"status" json:"status"`
Auth string `db:"auth" json:"auth"`
UserIp string `db:"userIp" json:"userIp"`
RemoteIp string `db:"remoteIp" json:"remoteIp"`
Referer string `db:"referer" json:"referer"`
UserAgent string `db:"userAgent" json:"userAgent"`
Meta types.JsonMap `db:"meta" json:"meta"`
}
func (m *Request) TableName() string {
return "_requests"
}