feat: update template
This commit is contained in:
@@ -3,7 +3,17 @@ package auth
|
||||
import "time"
|
||||
|
||||
type RefreshTokenRecord struct {
|
||||
UserID int32 `json:"user_id"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
ExpiresAt time.Time `json:"expires_at"`
|
||||
UserID int32 `json:"user_id"`
|
||||
TokenVersion int32 `json:"token_version"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
ExpiresAt time.Time `json:"expires_at"`
|
||||
}
|
||||
|
||||
// IsAdmin 判断用户是否是超级管理员
|
||||
func IsAdmin(uid int32) bool {
|
||||
if uid == 1 {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user