mirror of
https://github.com/pocketbase/pocketbase.git
synced 2025-01-10 00:43:36 +02:00
30 lines
757 B
Go
30 lines
757 B
Go
|
package models
|
||
|
|
||
|
import "github.com/pocketbase/pocketbase/tools/types"
|
||
|
|
||
|
var _ Model = (*Request)(nil)
|
||
|
|
||
|
// list with the supported values for `Request.Auth`
|
||
|
const (
|
||
|
RequestAuthGuest = "guest"
|
||
|
RequestAuthUser = "user"
|
||
|
RequestAuthAdmin = "admin"
|
||
|
)
|
||
|
|
||
|
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"`
|
||
|
Ip string `db:"ip" json:"ip"`
|
||
|
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"
|
||
|
}
|