nezha/model/common.go

23 lines
477 B
Go
Raw Normal View History

2019-12-08 16:59:58 +08:00
package model
import (
"time"
)
2019-12-08 16:59:58 +08:00
2019-12-20 23:58:09 +08:00
const CtxKeyAuthorizedUser = "ckau"
const CtxKeyViewPasswordVerified = "ckvpv"
const CacheKeyOauth2State = "p:a:state"
2019-12-08 16:59:58 +08:00
type Common struct {
ID uint64 `gorm:"primaryKey"`
CreatedAt time.Time `sql:"index"`
2019-12-08 16:59:58 +08:00
UpdatedAt time.Time
DeletedAt *time.Time `sql:"index"`
}
type Response struct {
2021-08-10 20:13:17 +08:00
Code int `json:"code,omitempty"`
2019-12-08 16:59:58 +08:00
Message string `json:"message,omitempty"`
Result interface{} `json:"result,omitempty"`
}