trading-platform-database-v2/ddl/schemas/market_data/00-enums.sql
rckrdmrd 45e77e9a9c feat: Initial commit - Database schemas and scripts
DDL schemas for Trading Platform:
- User management
- Authentication
- Payments
- Education
- ML predictions
- Trading data

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 04:30:23 -06:00

30 lines
902 B
SQL

-- ============================================================================
-- Schema: market_data
-- File: 00-enums.sql
-- Description: ENUMs para datos de mercado OHLCV
-- ============================================================================
-- Tipo de activo
CREATE TYPE market_data.asset_type AS ENUM (
'forex', -- Pares de divisas (EURUSD, GBPUSD, etc.)
'crypto', -- Criptomonedas (BTCUSD, ETHUSD, etc.)
'commodity', -- Commodities (XAUUSD, XAGUSD, etc.)
'index', -- Índices (SPX500, NAS100, etc.)
'stock' -- Acciones
);
-- Temporalidad
CREATE TYPE market_data.timeframe AS ENUM (
'1m',
'5m',
'15m',
'30m',
'1h',
'4h',
'1d',
'1w'
);
COMMENT ON TYPE market_data.asset_type IS 'Clasificación de tipo de activo financiero';
COMMENT ON TYPE market_data.timeframe IS 'Temporalidades soportadas para datos OHLCV';