nezha/model/common.go

25 lines
487 B
Go
Raw Normal View History

2019-12-08 03:59:58 -05:00
package model
import "time"
2019-12-20 10:58:09 -05:00
// CtxKeyAuthorizedUser ..
const CtxKeyAuthorizedUser = "ckau"
2019-12-08 03:59:58 -05:00
// CtxKeyOauth2State ..
const CtxKeyOauth2State = "cko2s"
// Common ..
type Common struct {
ID uint64 `gorm:"primary_key"`
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt *time.Time `sql:"index"`
}
// Response ..
type Response struct {
Code uint64 `json:"code,omitempty"`
Message string `json:"message,omitempty"`
Result interface{} `json:"result,omitempty"`
}