extend user model with status tracking
This commit is contained in:
parent
b947535795
commit
9091ea8387
1 changed files with 10 additions and 10 deletions
|
|
@ -9,21 +9,21 @@ import (
|
||||||
type UserStatus string
|
type UserStatus string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
StatusActive UserStatus = "active"
|
UserStatusActive UserStatus = "active"
|
||||||
StatusDeactivated UserStatus = "deactivated"
|
UserStatusDeactivated UserStatus = "deactivated"
|
||||||
StatusLocked UserStatus = "locked"
|
UserStatusLocked UserStatus = "locked"
|
||||||
StatusBanned UserStatus = "banned"
|
UserStatusBanned UserStatus = "banned"
|
||||||
StatusPendingDeletion UserStatus = "pending_deletion"
|
UserStatusPendingDeletion UserStatus = "pending_deletion"
|
||||||
)
|
)
|
||||||
|
|
||||||
type User struct {
|
type User struct {
|
||||||
ID string
|
ID string
|
||||||
Email string
|
Email string
|
||||||
EmailVerifiedAt NullTime
|
EmailVerifiedAt NullTime
|
||||||
Username string
|
Username NullString
|
||||||
UsernameNormalized string
|
UsernameNormalized NullString
|
||||||
DisplayName string
|
DisplayName NullString
|
||||||
ProfileImageURL string
|
ProfileImageURL NullString
|
||||||
|
|
||||||
Status UserStatus
|
Status UserStatus
|
||||||
StatusReason string
|
StatusReason string
|
||||||
|
|
@ -99,7 +99,7 @@ type Token struct {
|
||||||
HashedValue string
|
HashedValue string
|
||||||
Payload JSONB
|
Payload JSONB
|
||||||
ExpiresAt time.Time
|
ExpiresAt time.Time
|
||||||
ConsumedAt time.Time
|
ConsumedAt NullTime
|
||||||
CreatedAt time.Time
|
CreatedAt time.Time
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue