Initial Commit

This commit is contained in:
netkas 2024-08-31 15:19:36 -04:00
commit f5e16443d8
9 changed files with 264 additions and 0 deletions

View file

@ -0,0 +1,12 @@
The Entity object can be used to represent a entity such as a User, Bot or anything to mimic a sender or receiver.
---
- `uuid`: (**String**) *The Unique Universal Identifier of the entity, see [[UUID Standard]] for how the UUID should be structured*
- `type`: (**Enum**) *The Enum value of the entity type*
- `USER`: *This represents a user account on the instance*
- `BOT`: *This represents a bot account managed by a user on the instance*
- `CHANNEL`: *This represents a channel that the user can subscribe and or post as.*
- `username`: (**String**): *This represents the unique username under the domain*
- `domain`: (**String**): *This represents the domain the entity is under*
- `display_name`: (**String**) *The display name of the entity*

View file

@ -0,0 +1,15 @@
The user object is used for storing basic information about the user, authentication details are not stored on this table. Instead it would be a foreign reference key for the available authentication types that this user can use.
This object extends [[Entity]] to represent an entity.
----
## Structure
- `uuid` (**String**): *The Unique Universal Identifier for the user object* #unique #primary_key #indexed This extends [[Entity]]
- `type` (Enum): The entity type, for users it's always `USER`. This extends [[Entity]]
- `username` (**String**): *The Unique username associated with the user* #unique #paired_index (with `domain`) #indexed. This extends [[Entity]]
- `domain` (**String**): *The domain to which this user is associated with, by default `LOCAL` for users created under the server's local domain.* (==This server manages this user==) #paired_index #indexed This extends [[Entity]]
`username` and `domain` are paired unique indexes, which means the username `John` may exist under `LOCAL` but uniquely, no other user under `LOCAL` can claim this username; but someone else from `example.com` may claim the username `John` so that `john@localhost` and `john@example.com` are always unique pairs per server instance
- `display_name`: (**String**) *The display name for the user, non-unique.
- `anonymous`: (Boolean) Indicates if this user account is temporary & anonymous
- `created`: (Timestamp) *The Timestamp for when this account was created*