框架表改名 w_{name}

This commit is contained in:
ryan
2026-06-11 09:27:15 +08:00
parent 786fe71778
commit 312bc7d4d5
17 changed files with 245 additions and 21 deletions
+5
View File
@@ -30,6 +30,11 @@ type AccessToken struct {
UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime"`
}
// TableName 表名
func (AccessToken) TableName() string {
return "w_access_tokens"
}
// GenerateTokenString 生成加密安全的随机 Token 值
func GenerateTokenString() (string, error) {
bytes := make([]byte, tokenByteLength)