ngrok http --host-header=rewrite 8080
This document provides a comprehensive overview of the database models used in the project, detailing the structure and data types of each model:
This README outlines the structure of the database models used in the project.
- 1. Users
- 2. Tokens
- 3. Banners
- 4. Countries
- 5. FAQs
- 6. Feedbacks
- 7. KYCs
- 8. KYC Submissions
- 9. Transactions
- 10. Broadcasts
- 11. Web3 Wallets
- 12. Fiat Wallets
- 13. P2P Orders
id
: Integername
: Stringusername
: Stringemail
: Stringcountry
: Stringpassword
: Stringphone
: Optiondob
: Option (Date of Birth)is_verified
: Booleandevice_token
: Stringreferral_code
: Stringreferred_by
: Optionprofile_image
: Optionaccess_role
: Enum ("user", "agent", "merchant", "expert", "admin", "super_admin")is_enabled
: Booleansettings
: JSONB
{
"notifications": {
"notify_me_on_transactions": Boolean,
"notify_me_on_new_login": {
"is_enabled": Boolean,
"last_login_device": Option<String>
}
},
"security": {
"two_fa": {
"is_enabled": Boolean,
"secret_key": String
}
}
}
id
: Integername
: Stringsymbol
: Stringicon
: Stringchain
: Stringcontract_address
: Stringabi
: Stringdecimals
: Integerminimum_transfer
: Integerminimum_swap
: Integercharges
: Arrayis_enabled
: Boolean
[
{
"charge_percentage": Float,
"charge_cap": Float,
"charge_recipient_address": String
}
]
id
: Integerimage_url
: Stringurl
: Optiontitle
: Optiondescription
: Optionis_enabled
: Boolean
id
: Integercountry_name
: Stringcountry_code
: Stringicon
: Stringcurrency_name
: Stringcurrency_code
: Stringis_enabled
: Boolean
id
: Integerquestion
: Stringanswer
: String
-
id
: Integer -
user_id
: Integer -
content
: String
id
: Integerkyc_level
: Integercountries
: Array
[
{
"country_id": Integer,
"requirements": [
{
"name": String,
"description": String,
"content_type": String
}
// ... other documents/data
]
}
]
id
: Integerkyc_id
: Integeruser_id
: Integersubmitted_data
: Arrayapproved
: Boolean
[
{
"name": String,
"content": String
}
// ... other submitted data
]
id
: Integerdetails
: Enum ("crypto", "fiat")
crypto: {
swap: {
transaction_id: String
// ... additional fields
}
transfer: {
// ... similar structure as swap
}
exchange: {
// ... similar structure with additional fields
}
}
fiat: {
transfer: {
// ... structure for fiat transfers
}
exchange: {
// ... structure for fiat to crypto exchange
}
}
id
: Integerimage
: Optiontitle
: Stringmessage
: Stringcountry_group
: Optionbroadcast_type
: Enum ("push_notification", "email")
id
: Integeruser_id
: Integerprotocol
: Stringpublic_key
: Stringsecret_key
: Stringis_enabled
: Boolean
id
: Integeruser_id
: Integercurrencies
: Array
[
{
"country_id": Integer,
"balance": Float,
"is_enabled": Boolean
}
]
id
: Integeruser_id
: Integerrates_pair
: { "crypto": { "token_id": Integer, "unit_value": Float }, "fiat": { "country_id": Integer, "unit_value": Float } }
For more info about this model, refer to the file at: /src/api/v1/models/mod.rs