27 lines
356 B
Go
27 lines
356 B
Go
package models
|
|
|
|
import (
|
|
"database/sql"
|
|
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
type User struct {
|
|
gorm.Model
|
|
Name string
|
|
Email string
|
|
Password string
|
|
TotpSecret sql.NullString
|
|
IsAdmin bool
|
|
SkipWelcome bool
|
|
}
|
|
|
|
type UserRoles struct {
|
|
gorm.Model
|
|
UserID uint
|
|
User User
|
|
RoleID uint
|
|
Role Role
|
|
SectionID uint
|
|
Section Section
|
|
}
|