pop-camarades/models/users.go

46 lines
848 B
Go

package models
import (
"database/sql"
"gorm.io/gorm"
)
type User struct {
gorm.Model
Name string
Email string
Password string
TotpSercet sql.NullString
DisabledAt sql.NullTime
IsAdmin bool
SkipWelcome bool
}
type ManageSection struct {
gorm.Model
UserID uint
User User
SectionID uint
Section Section
ShowPerson bool
CreatePerson bool
EditPerson bool
ShowArchivedPerson bool
ArchivePerson bool
UnarchivePerson bool
}
type ManageParentSection struct {
gorm.Model
UserID uint
User User
ParentSectionID uint
ParentSection ParentSection
ShowPerson bool
CreatePerson bool
EditPerson bool
ShowArchivedPerson bool
ArchivePerson bool
UnarchivePerson bool
}