Email is unique for people + start work on authelia integration
This commit is contained in:
parent
76981f31c8
commit
aeb43e4775
9 changed files with 82 additions and 4 deletions
|
|
@ -1,6 +1,11 @@
|
|||
package models
|
||||
|
||||
import "gorm.io/gorm"
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type Person struct {
|
||||
gorm.Model
|
||||
|
|
@ -8,7 +13,7 @@ type Person struct {
|
|||
IsContact bool
|
||||
FirstName string
|
||||
LastName string
|
||||
Email string
|
||||
Email string `gorm:"unique"`
|
||||
Phone string
|
||||
Mobile string
|
||||
Address1 string
|
||||
|
|
@ -18,3 +23,21 @@ type Person struct {
|
|||
SectionID uint
|
||||
Section Section
|
||||
}
|
||||
|
||||
type PersonAccount struct {
|
||||
gorm.Model
|
||||
PersonID uint
|
||||
Person Person
|
||||
UUID uuid.UUID `gorm:"unique"`
|
||||
Enabled bool
|
||||
Email string `gorm:"unique"`
|
||||
GivenName string
|
||||
FamilyName string
|
||||
DisplayName string
|
||||
Groups string
|
||||
InitialPassword string
|
||||
InvitationSent time.Time
|
||||
AccountReady bool
|
||||
AccountCreated bool
|
||||
UpdateNeeded bool
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue