Files
ForgeBucket/internal/models/user.go
T
2026-05-07 00:09:50 +02:00

15 lines
726 B
Go

package models
import "time"
type User struct {
ID int64 `xorm:"'id' pk autoincr" json:"id"`
Username string `xorm:"'username' unique notnull varchar(64)" json:"username"`
Email string `xorm:"'email' unique notnull varchar(255)" json:"email"`
PasswordHash string `xorm:"'password_hash' notnull" json:"-"`
AvatarURL string `xorm:"'avatar_url' varchar(500)" json:"avatarUrl"`
IsAdmin bool `xorm:"'is_admin' default false" json:"isAdmin"`
CreatedAt time.Time `xorm:"'created_at' created" json:"createdAt"`
UpdatedAt time.Time `xorm:"'updated_at' updated" json:"updatedAt"`
}