erDiagram
COMPANIAS {
text nombre PK
}
DIC_VENDEDOR {
text nombre PK
}
DIC_SECTOR {
text nombre PK
}
DIC_AREA {
text nombre PK
}
DIC_CLASIFICACION {
text nombre PK
}
DIC_ESTADO {
text nombre PK
}
CLIENTES {
int id PK
text vendedor FK
text compania FK
text sector FK
text cliente_o_prospecto
text nombre_cliente
text correo
text telefono
text celular
text puesto
text si_no
}
OPORTUNIDADES {
bigint id_oportunidad PK
text vendedor FK
text compania FK
text sector FK
text area FK
text clasificacion FK
text estado FK
text cliente_o_prospecto
text nombre_oportunidad
numeric valor_usd
numeric valor_crc
numeric tipo_cambio
text venta_lograda
text num_procedimiento
text num_factura
text factura_pagada
text pago_parcial
numeric monto_parcial
text venta_perdida
timestamp fecha_modificacion
timestamp fecha_ingreso
timestamp fecha_creacion
text notas
}
OPORTUNIDADES2025 {
bigint id_oportunidad PK
}
OPORTUNIDADES_0 {
bigint id_oportunidad PK
text vendedor FK
text compania FK
text sector FK
text area FK
text clasificacion FK
text estado FK
}
DAC_QA_HEARTBEAT {
int id PK
}
TABLA_KPIS_DASHBOARD_ACTUAL {
int id PK
text vendedor UK
}
TABLA_KPIS_DASHBOARD_2025 {
int id PK
}
TABLA_KPIS_POR_AREA {
int id PK
text area
}
TABLA_KPIS_POR_CLASIFICACION {
int id PK
text clasificacion
}
TABLA_KPIS_POR_COMPANIA {
int id PK
text compania
}
TABLA_KPIS_POR_SECTOR {
int id PK
text sector
}
TABLA_KPIS_VENDEDOR_AREA {
int id PK
text vendedor
text area
}
TABLA_KPIS_VENDEDOR_CLASIFICACION {
int id PK
text vendedor
text clasificacion
}
TABLA_KPIS_VENDEDOR_COMPANIA {
int id PK
text vendedor
text compania
}
TABLA_KPIS_VENDEDOR_SECTOR {
int id PK
text vendedor
text sector
}
OPORTUNIDADES }o--|| DIC_VENDEDOR : "vendedor"
OPORTUNIDADES }o--|| COMPANIAS : "compania"
OPORTUNIDADES }o--|| DIC_SECTOR : "sector"
OPORTUNIDADES }o--|| DIC_AREA : "area"
OPORTUNIDADES }o--|| DIC_CLASIFICACION : "clasificacion"
OPORTUNIDADES }o--|| DIC_ESTADO : "estado"
OPORTUNIDADES_0 }o--|| DIC_VENDEDOR : "vendedor"
OPORTUNIDADES_0 }o--|| COMPANIAS : "compania"
OPORTUNIDADES_0 }o--|| DIC_SECTOR : "sector"
OPORTUNIDADES_0 }o--|| DIC_AREA : "area"
OPORTUNIDADES_0 }o--|| DIC_CLASIFICACION : "clasificacion"
OPORTUNIDADES_0 }o--|| DIC_ESTADO : "estado"
CLIENTES }o--|| DIC_VENDEDOR : "vendedor"
CLIENTES }o--|| COMPANIAS : "compania"
CLIENTES }o--|| DIC_SECTOR : "sector"