Profiles

This commit is contained in:
2024-01-28 16:17:38 +08:00
parent a26fc8fb6e
commit d4aef5277f
8 changed files with 88 additions and 38 deletions

View File

@ -19,10 +19,12 @@ type Account struct {
Name string `json:"name" gorm:"uniqueIndex"`
Nick string `json:"nick"`
State AccountState `json:"state"`
Profile AccountProfile `json:"profile"`
Session []AuthSession `json:"sessions"`
Challenges []AuthChallenge `json:"challenges"`
Factors []AuthFactor `json:"factors"`
Contacts []AccountContact `json:"contacts"`
ConfirmedAt *time.Time `json:"confirmed_at"`
Permissions datatypes.JSONType[[]string] `json:"permissions"`
}

14
pkg/models/profiles.go Normal file
View File

@ -0,0 +1,14 @@
package models
import "time"
type AccountProfile struct {
BaseModel
FirstName string `json:"first_name"`
MiddleName string `json:"middle_name"`
LastName string `json:"last_name"`
Experience uint64 `json:"experience"`
Birthday *time.Time `json:"birthday"`
AccountID uint `json:"account_id"`
}