15 lines
342 B
Go
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"`
|
|
}
|