-
Notifications
You must be signed in to change notification settings - Fork 0
Database_Format
Phillweston edited this page May 7, 2024
·
3 revisions
- Last Modified: 2024-05-03
- Author: Phill Weston
This document provides a detailed description of the database format for the PhotoEditor-Server service. The service is responsible for storing user interactions with the Twitter API, airdrop claims, promotion codes, and subscription information.
The database for this service is hosted in a MongoDB instance, which is run in a Docker environment. This setup allows for easy scalability and isolation of the database service.
-
Image Download Collection for User
- Collection Name:
imageDownload
- Index:
{ userId: 1, fileName: 1 }
- Unique:
true
- Items:
-
userId
(string): The ID of the user. -
fileName
(string): The name of the file. -
createdAt
(Date): The timestamp of the interaction.
-
- Collection Name:
-
Image Upload Collection for User
- Collection Name:
imageUpload
- Index:
{ userId: 1, userAddress: 1, textJSON: 1 }
- Unique:
true
- Items:
-
userId
(string): The ID of the user. -
userAddress
(string): The address of the user. -
textJSON
(Object|null): The JSON text of the image, null if not available. -
createdAt
(Date): The timestamp of the airdrop claim.
-
- Collection Name:
-
Clipboard Info Collection for User
- Collection Name:
clipboardInfo
- Index:
{ userId: 1, userAddress: 1, userPrivateKey: -1 }
- Unique:
true
- Items:
-
userId
(string): The ID of the user. -
userAddress
(string): The address of the user. -
userPrivateKey
(string): The private key of the user. -
createdAt
(Date): The timestamp of the promotion code creation.
-
- Collection Name:
-
Image Edit Info Collection for User
- Collection Name:
imageEditInfo
- Index:
{ fileName: 1, editInfo: 1 }
- Unique:
true
- Items:
-
fileName
(string): The name of the file. -
editInfo
(object): The edit information of the image. -
createdAt
(Date): The timestamp of the promotion code creation.
-
- Collection Name:
-
Keyword Collection for User
- Collection Name:
keywords
- Index:
{ keywords: 1 }
- Unique:
false
- Items:
-
keywords
(string): The keywords set to filter the specified name of image. -
createdAt
(Date): The timestamp of the promotion code creation.
-
- Collection Name:
-
User Activation Collection
- Collection Name:
userActivation
- Index:
{ userId: 1, userAddress: 1, signature: 1, expirationDate: -1 }
- Unique:
true
- Items:
-
userId
(string): The ID of the user. -
userAddress
(string): The address of the user. -
signature
(string): The signature of the user. -
expirationDate
(Date): The timestamp of the expiration date of the subscription. -
createdAt
(Date): The timestamp of the promotion code creation.
-
- Collection Name:
-
Subscription Info Collection for User
- Collection Name:
subscriptionInfo
- Index:
{ userEmail: 1, userName: 1, subscriptionInfo: 1 }
- Unique:
true
- Items:
-
userEmail
(string): The email of the user. -
userName
(string): (Optional) The name of the user. -
subscriptionInfo
(string): (Optional) The subscription information of the user. -
createdAt
(Date): The timestamp of the subscription info creation.
-
- Collection Name: