add roles

This commit is contained in:
grngxd 2025-07-31 22:08:54 +01:00
parent 8ca089ecfb
commit b48a610e90
2 changed files with 20 additions and 19 deletions

View file

@ -32,12 +32,14 @@ type TokenResponse struct {
}
type User struct {
ID string `json:"id" gorm:"primaryKey"`
Username string `json:"username"`
Blacklisted bool `json:"blacklisted"`
Email string `json:"email"`
CreatedAt time.Time `json:"created_at"`
HashedApiKey string `json:"hashed_api_key"`
ID string `json:"id" gorm:"primaryKey"`
Username string `json:"username"`
Blacklisted bool `json:"blacklisted"`
Email string `json:"email"`
CreatedAt time.Time `json:"created_at"`
HashedApiKey string `json:"hashed_api_key"`
Role string `json:"role" gorm:"default:'free'"` // free, pro, pro+, admin
SubscriptionExpiresAt time.Time `json:"subscription_expires_at"`
}
type AvatarDecorationData struct {