Files
2026-04-09 00:14:57 +08:00

15 lines
342 B
Go

package model
import (
"gorm.io/gorm"
)
// User represents a registered user in the system.
type User struct {
gorm.Model
Username string `gorm:"uniqueIndex;not null"`
Password string `gorm:"not null"` // Hashed password
Role string `gorm:"type:varchar(20);not null;default:user"`
Enabled bool `gorm:"not null;default:true"`
}