385 lines
12 KiB
YAML
385 lines
12 KiB
YAML
# DATABASE INVENTORY - OrbiQuant IA Trading Platform
|
|
# Generado: 2025-12-08
|
|
# Sistema: NEXUS + SIMCO v2.2.0
|
|
|
|
database:
|
|
nombre: orbiquant_trading
|
|
motor: PostgreSQL 15+
|
|
path_ddl: apps/database/ddl/
|
|
path_seeds: apps/database/seeds/
|
|
path_scripts: apps/database/scripts/
|
|
|
|
schemas:
|
|
# ==================== AUTH ====================
|
|
- nombre: auth
|
|
descripcion: Autenticacion y usuarios
|
|
estado: Completo
|
|
tablas:
|
|
- nombre: users
|
|
archivo: schemas/auth/tables/01-users.sql
|
|
columnas_principales: [id, email, password_hash, status, created_at]
|
|
estado: Implementado
|
|
|
|
- nombre: user_profiles
|
|
archivo: schemas/auth/tables/02-user_profiles.sql
|
|
estado: Implementado
|
|
|
|
- nombre: oauth_accounts
|
|
archivo: schemas/auth/tables/03-oauth_accounts.sql
|
|
estado: Implementado
|
|
|
|
- nombre: sessions
|
|
archivo: schemas/auth/tables/04-sessions.sql
|
|
estado: Implementado
|
|
|
|
- nombre: email_verifications
|
|
archivo: schemas/auth/tables/05-email_verifications.sql
|
|
estado: Implementado
|
|
|
|
- nombre: phone_verifications
|
|
archivo: schemas/auth/tables/06-phone_verifications.sql
|
|
estado: Implementado
|
|
|
|
- nombre: password_reset_tokens
|
|
archivo: schemas/auth/tables/07-password_reset_tokens.sql
|
|
estado: Implementado
|
|
|
|
- nombre: auth_logs
|
|
archivo: schemas/auth/tables/08-auth_logs.sql
|
|
estado: Implementado
|
|
|
|
- nombre: login_attempts
|
|
archivo: schemas/auth/tables/09-login_attempts.sql
|
|
estado: Implementado
|
|
|
|
- nombre: rate_limiting_config
|
|
archivo: schemas/auth/tables/10-rate_limiting_config.sql
|
|
estado: Implementado
|
|
|
|
funciones:
|
|
- nombre: update_updated_at
|
|
archivo: schemas/auth/functions/01-update_updated_at.sql
|
|
- nombre: log_auth_event
|
|
archivo: schemas/auth/functions/02-log_auth_event.sql
|
|
- nombre: cleanup_expired_sessions
|
|
archivo: schemas/auth/functions/03-cleanup_expired_sessions.sql
|
|
- nombre: create_user_profile_trigger
|
|
archivo: schemas/auth/functions/04-create_user_profile_trigger.sql
|
|
|
|
# ==================== TRADING ====================
|
|
- nombre: trading
|
|
descripcion: Trading, watchlists, ordenes
|
|
estado: Completo
|
|
tablas:
|
|
- nombre: symbols
|
|
archivo: schemas/trading/tables/01-symbols.sql
|
|
estado: Implementado
|
|
|
|
- nombre: watchlists
|
|
archivo: schemas/trading/tables/02-watchlists.sql
|
|
estado: Implementado
|
|
|
|
- nombre: watchlist_items
|
|
archivo: schemas/trading/tables/03-watchlist_items.sql
|
|
estado: Implementado
|
|
|
|
- nombre: bots
|
|
archivo: schemas/trading/tables/04-bots.sql
|
|
estado: Implementado
|
|
|
|
- nombre: orders
|
|
archivo: schemas/trading/tables/05-orders.sql
|
|
estado: Implementado
|
|
|
|
- nombre: positions
|
|
archivo: schemas/trading/tables/06-positions.sql
|
|
estado: Implementado
|
|
|
|
- nombre: trades
|
|
archivo: schemas/trading/tables/07-trades.sql
|
|
estado: Implementado
|
|
|
|
- nombre: signals
|
|
archivo: schemas/trading/tables/08-signals.sql
|
|
estado: Implementado
|
|
|
|
- nombre: trading_metrics
|
|
archivo: schemas/trading/tables/09-trading_metrics.sql
|
|
estado: Implementado
|
|
|
|
- nombre: paper_balances
|
|
archivo: schemas/trading/tables/10-paper_balances.sql
|
|
estado: Implementado
|
|
|
|
funciones:
|
|
- nombre: calculate_position_pnl
|
|
archivo: schemas/trading/functions/01-calculate_position_pnl.sql
|
|
- nombre: update_bot_stats
|
|
archivo: schemas/trading/functions/02-update_bot_stats.sql
|
|
- nombre: initialize_paper_balance
|
|
archivo: schemas/trading/functions/03-initialize_paper_balance.sql
|
|
- nombre: create_default_watchlist
|
|
archivo: schemas/trading/functions/04-create_default_watchlist.sql
|
|
|
|
# ==================== EDUCATION ====================
|
|
- nombre: education
|
|
descripcion: Cursos, modulos, gamificacion
|
|
estado: Completo
|
|
tablas:
|
|
- nombre: categories
|
|
archivo: schemas/education/tables/01-categories.sql
|
|
estado: Implementado
|
|
|
|
- nombre: courses
|
|
archivo: schemas/education/tables/02-courses.sql
|
|
estado: Implementado
|
|
|
|
- nombre: modules
|
|
archivo: schemas/education/tables/03-modules.sql
|
|
estado: Implementado
|
|
|
|
- nombre: lessons
|
|
archivo: schemas/education/tables/04-lessons.sql
|
|
estado: Implementado
|
|
|
|
- nombre: enrollments
|
|
archivo: schemas/education/tables/05-enrollments.sql
|
|
estado: Implementado
|
|
|
|
- nombre: progress
|
|
archivo: schemas/education/tables/06-progress.sql
|
|
estado: Implementado
|
|
|
|
- nombre: quizzes
|
|
archivo: schemas/education/tables/07-quizzes.sql
|
|
estado: Implementado
|
|
|
|
- nombre: quiz_questions
|
|
archivo: schemas/education/tables/08-quiz_questions.sql
|
|
estado: Implementado
|
|
|
|
- nombre: quiz_attempts
|
|
archivo: schemas/education/tables/09-quiz_attempts.sql
|
|
estado: Implementado
|
|
|
|
- nombre: certificates
|
|
archivo: schemas/education/tables/10-certificates.sql
|
|
estado: Implementado
|
|
|
|
- nombre: user_achievements
|
|
archivo: schemas/education/tables/11-user_achievements.sql
|
|
estado: Implementado
|
|
|
|
- nombre: user_gamification_profile
|
|
archivo: schemas/education/tables/12-user_gamification_profile.sql
|
|
estado: Implementado
|
|
|
|
- nombre: user_activity_log
|
|
archivo: schemas/education/tables/13-user_activity_log.sql
|
|
estado: Implementado
|
|
|
|
- nombre: course_reviews
|
|
archivo: schemas/education/tables/14-course_reviews.sql
|
|
estado: Implementado
|
|
|
|
funciones:
|
|
- nombre: update_updated_at
|
|
archivo: schemas/education/functions/01-update_updated_at.sql
|
|
- nombre: update_enrollment_progress
|
|
archivo: schemas/education/functions/02-update_enrollment_progress.sql
|
|
- nombre: auto_complete_enrollment
|
|
archivo: schemas/education/functions/03-auto_complete_enrollment.sql
|
|
- nombre: generate_certificate
|
|
archivo: schemas/education/functions/04-generate_certificate.sql
|
|
- nombre: update_course_stats
|
|
archivo: schemas/education/functions/05-update_course_stats.sql
|
|
- nombre: update_enrollment_count
|
|
archivo: schemas/education/functions/06-update_enrollment_count.sql
|
|
- nombre: update_gamification_profile
|
|
archivo: schemas/education/functions/07-update_gamification_profile.sql
|
|
|
|
# ==================== FINANCIAL ====================
|
|
- nombre: financial
|
|
descripcion: Wallets, suscripciones, pagos
|
|
estado: Completo
|
|
tablas:
|
|
- nombre: wallets
|
|
archivo: schemas/financial/tables/01-wallets.sql
|
|
estado: Implementado
|
|
|
|
- nombre: wallet_transactions
|
|
archivo: schemas/financial/tables/02-wallet_transactions.sql
|
|
estado: Implementado
|
|
|
|
- nombre: subscriptions
|
|
archivo: schemas/financial/tables/03-subscriptions.sql
|
|
estado: Implementado
|
|
|
|
- nombre: payments
|
|
archivo: schemas/financial/tables/04-payments.sql
|
|
estado: Implementado
|
|
|
|
- nombre: invoices
|
|
archivo: schemas/financial/tables/05-invoices.sql
|
|
estado: Implementado
|
|
|
|
- nombre: wallet_audit_log
|
|
archivo: schemas/financial/tables/06-wallet_audit_log.sql
|
|
estado: Implementado
|
|
|
|
- nombre: currency_exchange_rates
|
|
archivo: schemas/financial/tables/07-currency_exchange_rates.sql
|
|
estado: Implementado
|
|
|
|
- nombre: wallet_limits
|
|
archivo: schemas/financial/tables/08-wallet_limits.sql
|
|
estado: Implementado
|
|
|
|
- nombre: customers
|
|
archivo: schemas/financial/tables/09-customers.sql
|
|
estado: Implementado
|
|
|
|
- nombre: payment_methods
|
|
archivo: schemas/financial/tables/10-payment_methods.sql
|
|
estado: Implementado
|
|
|
|
funciones:
|
|
- nombre: update_wallet_balance
|
|
archivo: schemas/financial/functions/01-update_wallet_balance.sql
|
|
- nombre: process_transaction
|
|
archivo: schemas/financial/functions/02-process_transaction.sql
|
|
|
|
# ==================== INVESTMENT ====================
|
|
- nombre: investment
|
|
descripcion: Productos de inversion, cuentas
|
|
estado: Completo
|
|
tablas:
|
|
- nombre: products
|
|
archivo: schemas/investment/tables/01-products.sql
|
|
descripcion: Atlas, Orion, Nova
|
|
estado: Implementado
|
|
|
|
- nombre: accounts
|
|
archivo: schemas/investment/tables/02-accounts.sql
|
|
estado: Implementado
|
|
|
|
- nombre: transactions
|
|
archivo: schemas/investment/tables/03-transactions.sql
|
|
estado: Implementado
|
|
|
|
- nombre: distributions
|
|
archivo: schemas/investment/tables/04-distributions.sql
|
|
estado: Implementado
|
|
|
|
- nombre: risk_questionnaire
|
|
archivo: schemas/investment/tables/05-risk_questionnaire.sql
|
|
estado: Implementado
|
|
|
|
- nombre: withdrawal_requests
|
|
archivo: schemas/investment/tables/06-withdrawal_requests.sql
|
|
estado: Implementado
|
|
|
|
- nombre: daily_performance
|
|
archivo: schemas/investment/tables/07-daily_performance.sql
|
|
estado: Implementado
|
|
|
|
# ==================== ML ====================
|
|
- nombre: ml
|
|
descripcion: Modelos ML, predicciones
|
|
estado: Completo
|
|
tablas:
|
|
- nombre: models
|
|
archivo: schemas/ml/tables/01-models.sql
|
|
estado: Implementado
|
|
|
|
- nombre: model_versions
|
|
archivo: schemas/ml/tables/02-model_versions.sql
|
|
estado: Implementado
|
|
|
|
- nombre: predictions
|
|
archivo: schemas/ml/tables/03-predictions.sql
|
|
estado: Implementado
|
|
|
|
- nombre: prediction_outcomes
|
|
archivo: schemas/ml/tables/04-prediction_outcomes.sql
|
|
estado: Implementado
|
|
|
|
- nombre: feature_store
|
|
archivo: schemas/ml/tables/05-feature_store.sql
|
|
estado: Implementado
|
|
|
|
# ==================== LLM ====================
|
|
- nombre: llm
|
|
descripcion: Conversaciones, memoria del LLM
|
|
estado: Completo
|
|
tablas:
|
|
- nombre: conversations
|
|
archivo: schemas/llm/tables/01-conversations.sql
|
|
estado: Implementado
|
|
|
|
- nombre: messages
|
|
archivo: schemas/llm/tables/02-messages.sql
|
|
estado: Implementado
|
|
|
|
- nombre: user_preferences
|
|
archivo: schemas/llm/tables/03-user_preferences.sql
|
|
estado: Implementado
|
|
|
|
- nombre: user_memory
|
|
archivo: schemas/llm/tables/04-user_memory.sql
|
|
estado: Implementado
|
|
|
|
- nombre: embeddings
|
|
archivo: schemas/llm/tables/05-embeddings.sql
|
|
estado: Implementado
|
|
|
|
# ==================== AUDIT ====================
|
|
- nombre: audit
|
|
descripcion: Logs de auditoria
|
|
estado: Completo
|
|
tablas:
|
|
- nombre: audit_logs
|
|
archivo: schemas/audit/tables/01-audit_logs.sql
|
|
estado: Implementado
|
|
|
|
- nombre: security_events
|
|
archivo: schemas/audit/tables/02-security_events.sql
|
|
estado: Implementado
|
|
|
|
- nombre: system_events
|
|
archivo: schemas/audit/tables/03-system_events.sql
|
|
estado: Implementado
|
|
|
|
- nombre: trading_audit
|
|
archivo: schemas/audit/tables/04-trading_audit.sql
|
|
estado: Implementado
|
|
|
|
- nombre: api_request_logs
|
|
archivo: schemas/audit/tables/05-api_request_logs.sql
|
|
estado: Implementado
|
|
|
|
- nombre: data_access_logs
|
|
archivo: schemas/audit/tables/06-data_access_logs.sql
|
|
estado: Implementado
|
|
|
|
- nombre: compliance_logs
|
|
archivo: schemas/audit/tables/07-compliance_logs.sql
|
|
estado: Implementado
|
|
|
|
resumen:
|
|
total_schemas: 8
|
|
total_tablas: 63
|
|
total_funciones: 19
|
|
tablas_por_schema:
|
|
auth: 10
|
|
trading: 10
|
|
education: 14
|
|
financial: 10
|
|
investment: 7
|
|
ml: 5
|
|
llm: 5
|
|
audit: 7
|
|
|
|
ultima_actualizacion: 2025-12-08
|
|
actualizado_por: NEXUS-System
|