feat(auth): use Wayne native role APIs

This commit is contained in:
mac
2026-07-21 17:05:48 +08:00
parent 981e9557fe
commit c324e2ec59
15 changed files with 685 additions and 315 deletions
+9
View File
@@ -71,6 +71,15 @@ type AccessToken struct {
RevokedAt *time.Time `json:"revoked_at"`
}
type WayneToken struct {
ID uint64 `gorm:"primaryKey" json:"id"`
Account string `gorm:"size:128;not null;uniqueIndex" json:"account"`
Token string `gorm:"type:text;not null" json:"-"`
ExpiresAt time.Time `gorm:"not null;index" json:"expires_at"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type AuditLog struct {
ID uint64 `gorm:"primaryKey" json:"id"`
RequestID string `gorm:"size:128;not null;default:''" json:"request_id"`