package model import "time" type User struct { ID uint `gorm:"primaryKey" json:"id"` Username string `gorm:"size:64;uniqueIndex;not null" json:"username"` PasswordHash string `gorm:"column:password_hash;not null" json:"-"` DisplayName string `gorm:"size:128;not null" json:"displayName"` Email string `gorm:"size:255" json:"email"` Role string `gorm:"size:32;not null;default:admin" json:"role"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` } func (User) TableName() string { return "users" }