Emailstring`validate:"required_with=ConfirmedAt" 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`validate:"required,ulid" bun:"type:CHAR(26),nullzero,notnull,unique"`// The id of the local gtsmodel.Account entry for this user.
Account*Account`validate:"-" bun:"rel:belongs-to"`// Pointer to the account of this user that corresponds to AccountID.
EncryptedPasswordstring`validate:"required" 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.
SignUpIPnet.IP`validate:"-" bun:",nullzero"`// From what IP was this user created?
CurrentSignInAttime.Time`validate:"-" bun:",nullzero"`// When did the user sign in with their current session.
CurrentSignInIPnet.IP`validate:"-" bun:",nullzero"`// What's the most recent IP of this user
LastSignInAttime.Time`validate:"-" bun:",nullzero"`// When did this user last sign in?
LastSignInIPnet.IP`validate:"-" bun:",nullzero"`// What's the previous IP of this user?
SignInCountint`validate:"-" bun:",nullzero,notnull,default:0"`// How many times has this user signed in?
InviteIDstring`validate:"ulid" bun:"type:CHAR(26),nullzero"`// id of the user who invited this user (who let this joker in?)
ChosenLanguages[]string`validate:"-" bun:",nullzero"`// What languages does this user want to see?
FilteredLanguages[]string`validate:"-" bun:",nullzero"`// What languages does this user not want to see?
Localestring`validate:"-" bun:",nullzero"`// In what timezone/locale is this user located?
CreatedByApplicationIDstring`validate:"ulid" bun:"type:CHAR(26),nullzero,notnull"`// Which application id created this user? See gtsmodel.Application
CreatedByApplication*Application`validate:"-" bun:"rel:belongs-to"`// Pointer to the application corresponding to createdbyapplicationID.
LastEmailedAttime.Time`validate:"-" bun:",nullzero"`// When was this user last contacted by email.
ConfirmationTokenstring`validate:"required_with=ConfirmationSentAt" bun:",nullzero"`// What confirmation token did we send this user/what are we expecting back?
ConfirmationSentAttime.Time`validate:"required_with=ConfirmationToken" bun:",nullzero"`// When did we send email confirmation to this user?
ConfirmedAttime.Time`validate:"required_with=Email" bun:",nullzero"`// When did the user confirm their email address
UnconfirmedEmailstring`validate:"required_without=Email" bun:",nullzero"`// Email address that hasn't yet been confirmed
Moderatorbool`validate:"-" bun:",nullzero,notnull,default:false"`// Is this user a moderator?
Adminbool`validate:"-" bun:",nullzero,notnull,default:false"`// Is this user an admin?
Disabledbool`validate:"-" bun:",nullzero,notnull,default:false"`// Is this user disabled from posting?
Approvedbool`validate:"-" bun:",nullzero,notnull,default:false"`// Has this user been approved by a moderator?
ResetPasswordTokenstring`validate:"required_with=ResetPasswordSentAt" bun:",nullzero"`// The generated token that the user can use to reset their password
ResetPasswordSentAttime.Time`validate:"required_with=ResetPasswordToken" bun:",nullzero"`// When did we email the user their reset-password email?