mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-12-23 06:42:41 +00:00
add user.go
This commit is contained in:
parent
4e09c357eb
commit
80a6d8a9b1
1 changed files with 15 additions and 0 deletions
|
|
@ -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"`
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue