feat: update template

This commit is contained in:
2026-08-19 22:05:49 +08:00
parent 0e674e9d56
commit 5a71093b0c
67 changed files with 2070 additions and 585 deletions

View File

@@ -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
}