Improve model and add roles
This commit is contained in:
parent
488da64ccf
commit
3e984d059c
5 changed files with 32 additions and 38 deletions
|
|
@ -17,30 +17,12 @@ type User struct {
|
|||
SkipWelcome bool
|
||||
}
|
||||
|
||||
type ManageSection struct {
|
||||
type UserRoles 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
|
||||
UserID uint
|
||||
User User
|
||||
RoleID uint
|
||||
Role Role
|
||||
SectionID uint
|
||||
Section Section
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue