Files
ForgeBucket/internal/models/user.go
T
2026-05-06 23:39:04 +02:00

15 lines
606 B
Go

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