IDstring`bun:"type:CHAR(26),pk,nullzero,notnull,unique"`// id of this item in the database
CreatedAttime.Time`bun:"type:timestamptz,nullzero,notnull,default:current_timestamp"`// when was item created
UpdatedAttime.Time`bun:"type:timestamptz,nullzero,notnull,default:current_timestamp"`// when was item last updated
Emailstring`bun:",nullzero,unique"`// confirmed email address for this user, this should be unique -- only one email address registered per instance, multiple users per email are not supported
AccountIDstring`bun:"type:CHAR(26),nullzero,notnull,unique"`// The id of the local gtsmodel.Account entry for this user.
Account*Account`bun:"rel:belongs-to"`// Pointer to the account of this user that corresponds to AccountID.
EncryptedPasswordstring`bun:",nullzero,notnull"`// The encrypted password of this user, generated using https://pkg.go.dev/golang.org/x/crypto/bcrypt#GenerateFromPassword. A salt is included so we're safe against 🌈 tables.
Localestring`bun:",nullzero"`// In what timezone/locale is this user located?
CreatedByApplicationIDstring`bun:"type:CHAR(26),nullzero"`// Which application id created this user? See gtsmodel.Application
CreatedByApplication*Application`bun:"rel:belongs-to"`// Pointer to the application corresponding to createdbyapplicationID.
LastEmailedAttime.Time`bun:"type:timestamptz,nullzero"`// When was this user last contacted by email.
ConfirmationTokenstring`bun:",nullzero"`// What confirmation token did we send this user/what are we expecting back?
ConfirmationSentAttime.Time`bun:"type:timestamptz,nullzero"`// When did we send email confirmation to this user?
ConfirmedAttime.Time`bun:"type:timestamptz,nullzero"`// When did the user confirm their email address
UnconfirmedEmailstring`bun:",nullzero"`// Email address that hasn't yet been confirmed
Moderator*bool`bun:",nullzero,notnull,default:false"`// Is this user a moderator?
Admin*bool`bun:",nullzero,notnull,default:false"`// Is this user an admin?
Disabled*bool`bun:",nullzero,notnull,default:false"`// Is this user disabled from posting?
Approved*bool`bun:",nullzero,notnull,default:false"`// Has this user been approved by a moderator?
ResetPasswordTokenstring`bun:",nullzero"`// The generated token that the user can use to reset their password
ResetPasswordSentAttime.Time`bun:"type:timestamptz,nullzero"`// When did we email the user their reset-password email?
ExternalIDstring`bun:",nullzero,unique"`// If the login for the user is managed externally (e.g OIDC), we need to keep a stable reference to the external object (e.g OIDC sub claim)