nezha/model/common.go

24 lines
542 B
Go
Raw Normal View History

2019-12-08 03:59:58 -05:00
package model
import (
2022-10-23 11:53:24 -04:00
"gorm.io/gorm"
"time"
)
2019-12-08 03:59:58 -05:00
2019-12-20 10:58:09 -05:00
const CtxKeyAuthorizedUser = "ckau"
const CtxKeyViewPasswordVerified = "ckvpv"
const CacheKeyOauth2State = "p:a:state"
2019-12-08 03:59:58 -05:00
type Common struct {
2022-10-23 11:53:24 -04:00
ID uint64 `gorm:"primaryKey"`
CreatedAt time.Time `gorm:"<-:create"`
UpdatedAt time.Time `gorm:"autoUpdateTime"`
DeletedAt gorm.DeletedAt `gorm:"index"`
2019-12-08 03:59:58 -05:00
}
type Response struct {
2021-08-10 08:13:17 -04:00
Code int `json:"code,omitempty"`
2019-12-08 03:59:58 -05:00
Message string `json:"message,omitempty"`
Result interface{} `json:"result,omitempty"`
}