2019-12-08 16:59:58 +08:00
|
|
|
package model
|
|
|
|
|
2022-04-26 12:46:44 +08:00
|
|
|
import (
|
2022-10-23 23:53:24 +08:00
|
|
|
"gorm.io/gorm"
|
2022-04-26 12:46:44 +08:00
|
|
|
"time"
|
|
|
|
)
|
2019-12-08 16:59:58 +08:00
|
|
|
|
2019-12-20 23:58:09 +08:00
|
|
|
const CtxKeyAuthorizedUser = "ckau"
|
2022-09-30 22:40:56 +08:00
|
|
|
const CtxKeyViewPasswordVerified = "ckvpv"
|
2021-01-20 19:24:59 +08:00
|
|
|
const CacheKeyOauth2State = "p:a:state"
|
2019-12-08 16:59:58 +08:00
|
|
|
|
|
|
|
type Common struct {
|
2022-10-23 23:53:24 +08:00
|
|
|
ID uint64 `gorm:"primaryKey"`
|
|
|
|
CreatedAt time.Time `gorm:"<-:create"`
|
|
|
|
UpdatedAt time.Time `gorm:"autoUpdateTime"`
|
|
|
|
DeletedAt gorm.DeletedAt `gorm:"index"`
|
2019-12-08 16:59:58 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
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"`
|
|
|
|
}
|