Core Tables
Reference for the main database tables in the Fangate system. Schema as of documentation version 2.0.1.
users
Purpose: Creator and admin accounts.
| Column | Type | Description |
|---|---|---|
id | bigint | Primary key |
email | varchar | Unique email address |
password | varchar | Hashed password |
first_name | varchar | First name |
last_name | varchar | Last name |
birth_date | date | Date of birth |
currency_id | bigint | FK to currencies |
is_adult_content | boolean | Default AVS setting |
is_verif_age | boolean | Default Yoti requirement |
iban | varchar | Bank account IBAN |
bic_swift | varchar | Bank BIC/SWIFT |
stripe_account_id | varchar | Stripe Connect account |
created_at | timestamp | Registration date |
deleted_at | timestamp | Soft delete (nullable) |
products
| Column | Type | Description |
|---|---|---|
id | bigint | Primary key |
user_id | bigint | FK to users (creator) |
title | varchar | Product title (nullable) |
price | integer | Price in cents |
currency_id | bigint | FK to currencies |
link_hash | varchar | Unique link identifier |
is_adult_content | boolean | AVS flag |
is_verif_age | boolean | Yoti requirement |
public_description | text | Buyer-visible |
private_description | text | Creator-only |
link_clicks | integer | View count |
created_at | timestamp | Creation date |
updated_at | timestamp | Last update |
deleted_at | timestamp | Soft delete |
wallets
| Column | Type | Description |
|---|---|---|
id | bigint | Primary key |
user_id | bigint | FK to users |
balance | integer | Available balance (cents) |
hold | integer | Funds on hold (cents) |
pending | integer | Payout processing (cents) |
currency_id | bigint | FK to currencies |
created_at | timestamp | |
updated_at | timestamp |
Related Tables
Other important tables (refer to migrations and models):
- currencies — Supported currencies (USD, EUR, GBP)
- media — Product media files (photos, videos)
- transactions — Wallet transaction history
- collections — User collections (one per user currently)
- consents — Consent documents
- payment_providers — PSP configuration for payouts
Notes
- Soft deletes:
usersandproductsusedeleted_atfor soft delete - Money: All monetary values stored in cents (integer)
- Link hash: Unique per product, used in shareable URLs (
/p/{link_hash})