Update new storage types and regenerate

This commit is contained in:
Melody Becker 2025-03-28 16:15:41 +01:00
parent 0932f19f71
commit 41e432b56e
Signed by: mstar
SSH key fingerprint: SHA256:9VAo09aaVNTWKzPW7Hq2LW+ox9OdwmTSHRoD4mlz1yI
28 changed files with 6561 additions and 23 deletions

View file

@ -30,7 +30,6 @@ type User struct {
// identifier for users and other servers, especially when changing the username
// (username != display name) might be a future feature
// Same also applies for other types that use a UUID as primary key
// TODO: Copy the default value and gorm type to those other types as well
ID string `gorm:"primarykey;type:uuid;default:gen_random_uuid()"`
// Username of the user (eg "max" if the full username is @max@example.com)
// Assume unchangable (once set by a user) to be kind to other implementations
@ -63,9 +62,22 @@ type User struct {
Location *string
Birthday *time.Time
// --- And internal account stuff ---
// Whether the account got verified and is allowed to be active
// For local accounts being active means being allowed to login and perform interactions
// For remote users, if an account is not verified, any interactions it sends are discarded
Verified bool
// 64 byte unique id for passkeys, because UUIDs are 128 bytes and passkey spec says 64 bytes max
// In theory, could also slash Id in half, but that would be a lot more calculations than the
// saved space is worth
PasskeyId []byte
// ---- "Remote" linked values
InfoFields []UserInfoField
BeingTypes []UserToBeing
Tags []UserToTag
Relations []UserToUserRelation
Pronouns []UserToPronoun
Roles []UserToRole
RemoteInfo *UserRemoteLinks
AuthMethods []UserAuthMethod
}