User DTO Readme
This document provides an overview of the User Data Transfer Object (DTO) structure and its various fields. This DTO is used to encapsulate user-related data in a structured format for use in various applications.
User DTO Structure
JSON Representation
{
"id": "37963246-7e9d-4239-a95f-96704c6dcbaa",
"email": "example@example.com",
"username": "my_super_username",
"createdAt": "2021-01-01T00:00:00.000Z",
"updatedAt": "2021-01-01T00:00:00.000Z",
"avatar": "Byte array",
"banner": "Byte array",
"bannerColor": "#ffffff",
"bio": "I am a software developer",
"roles": [
"USER"
],
"friends": [
"friend1",
"friend2"
],
"servers": [
"server1",
"server2"
],
"channels": [
"channel1",
"channel2"
]
}
Fields Description
-
id:
String
- A unique identifier for the user.
- Example:
"37963246-7e9d-4239-a95f-96704c6dcbaa"
-
email:
String
- The user's email address.
- Example:
"example@example.com"
-
username:
String
- The user's chosen username.
- Example:
"my_super_username"
-
createdAt:
String (ISO 8601 format)
- The timestamp of when the user was created.
- Example:
"2021-01-01T00:00:00.000Z"
-
updatedAt:
String (ISO 8601 format)
- The timestamp of the last update to the user's information.
- Example:
"2021-01-01T00:00:00.000Z"
-
avatar:
Byte array
- The user's avatar image in byte array format.
-
banner:
Byte array
- The user's banner image in byte array format.
-
bannerColor:
String (Hex color code)
- The hex color code for the user's banner background.
- Example:
"#ffffff"
-
bio:
String
- A short biography or description of the user.
- Example:
"I am a software developer"
-
roles:
Array of Strings
- The roles assigned to the user.
Possible values:USER
,ADMIN
(will be extended in the future). - Example:
["USER"]
- The roles assigned to the user.
-
friends:
Many-to-Many Relationship
- An array of user IDs representing the user's friends.
- Example:
["friend1", "friend2"]
-
servers:
Many-to-Many Relationship
- An array of server IDs representing the servers the user is a member of.
- Example:
["server1", "server2"]
-
channels:
Many-to-Many Relationship
- An array of channel IDs representing the channels the user has access to.
- Example:
["channel1", "channel2"]