diff --git a/database/model/user.go b/database/model/user.go index e69de29b..5eebea2b 100644 --- a/database/model/user.go +++ b/database/model/user.go @@ -0,0 +1,15 @@ +package model + +import ( + "time" +) + +// User represents a panel user with RBAC role. +type User struct { + ID int `json:"id" gorm:"primaryKey;autoIncrement"` + Email string `json:"email" gorm:"unique;not null"` + Password string `json:"-" gorm:"not null"` + Role string `json:"role" gorm:"default:'reader'"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +}