-- MySQL dump 10.13  Distrib 5.7.32, for Linux (x86_64)
--
-- Host: localhost    Database: liberty
-- ------------------------------------------------------
-- Server version	5.7.32-0ubuntu0.18.04.1

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `estacion`
--

DROP TABLE IF EXISTS `estacion`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `estacion` (
  `codi_esta` char(20) NOT NULL,
  `codi_stat` int(10) unsigned NOT NULL,
  `desc_esta` char(50) NOT NULL,
  `nomb_cont` varchar(50) DEFAULT NULL,
  `text_obse` char(200) DEFAULT NULL,
  `dire_mail` varchar(300) NOT NULL,
  `nume_dias` varchar(20) NOT NULL COMMENT 'En cuantos dias llegamos a esta Zona del pais',
  `nume_tele` varchar(50) NOT NULL COMMENT 'Telefono de Contacto',
  `region_id` int(10) unsigned NOT NULL,
  `cuenta_cod` int(10) unsigned DEFAULT NULL,
  `cuenta_cnt` int(10) unsigned DEFAULT NULL,
  `cuenta_com` int(10) unsigned DEFAULT NULL,
  `pais_id` int(10) unsigned DEFAULT NULL,
  `porcentaje_venta` decimal(5,2) DEFAULT NULL COMMENT 'Porcentaje de Comision por Venta',
  `porcentaje_entrega` decimal(5,2) DEFAULT NULL COMMENT 'Porcentaje de Comisión por Entregas',
  `operacion_id` int(10) unsigned DEFAULT NULL,
  `dire_mail_principal` varchar(200) DEFAULT NULL,
  `zona_cod` int(10) unsigned DEFAULT NULL,
  `notificar_recolecta` int(10) unsigned DEFAULT NULL,
  `es_un_almacen` int(11) unsigned DEFAULT NULL,
  `oficina_fisica` int(10) unsigned DEFAULT NULL,
  `area_metropolitana` int(10) unsigned DEFAULT NULL,
  `sucursal_principal` int(10) unsigned DEFAULT NULL,
  `se_factura_en` int(10) unsigned DEFAULT NULL,
  `exenta_de_iva_id` int(10) unsigned DEFAULT NULL,
  `visible_en_registro_id` int(10) unsigned DEFAULT NULL,
  `estado_id` int(11) DEFAULT NULL,
  `zonas_nc` text,
  `frecuencia_de_cobertura` varchar(45) DEFAULT NULL,
  `palabra_relacionada` text COMMENT 'Palabra o nombre relacionado a una sucursal',
  PRIMARY KEY (`codi_esta`),
  UNIQUE KEY `idx_nombre` (`desc_esta`),
  KEY `estacion_FKIndex1` (`codi_stat`),
  KEY `region_id` (`region_id`),
  KEY `pais_id` (`pais_id`),
  KEY `idx_operacion` (`operacion_id`),
  KEY `idx_zonacod` (`zona_cod`),
  KEY `idx_notificar` (`notificar_recolecta`),
  KEY `fk_zonacod` (`zona_cod`),
  KEY `fk_notificar` (`notificar_recolecta`),
  KEY `es_un_almacen` (`es_un_almacen`),
  KEY `fk_oficfisi` (`oficina_fisica`),
  KEY `area_metropolitana` (`area_metropolitana`),
  KEY `sucursal_principal` (`sucursal_principal`),
  KEY `fk_sefacturaen` (`se_factura_en`),
  KEY `fk_exenta` (`exenta_de_iva_id`),
  KEY `fk_visible` (`visible_en_registro_id`),
  KEY `esta_edox_idx` (`estado_id`),
  CONSTRAINT `esta_edox_fk` FOREIGN KEY (`estado_id`) REFERENCES `estado` (`id`),
  CONSTRAINT `estacion_ibfk_3` FOREIGN KEY (`codi_stat`) REFERENCES `status_type` (`codi_stat`),
  CONSTRAINT `estacion_ibfk_4` FOREIGN KEY (`region_id`) REFERENCES `region` (`id`),
  CONSTRAINT `estacion_ibfk_5` FOREIGN KEY (`pais_id`) REFERENCES `pais` (`id`),
  CONSTRAINT `estacion_ibfk_6` FOREIGN KEY (`es_un_almacen`) REFERENCES `sino_type` (`codi_sino`),
  CONSTRAINT `estacion_ibfk_7` FOREIGN KEY (`area_metropolitana`) REFERENCES `sino_type` (`codi_sino`),
  CONSTRAINT `estacion_ibfk_8` FOREIGN KEY (`sucursal_principal`) REFERENCES `sino_type` (`codi_sino`),
  CONSTRAINT `fk_exenta` FOREIGN KEY (`exenta_de_iva_id`) REFERENCES `sino_type` (`codi_sino`),
  CONSTRAINT `fk_notificar` FOREIGN KEY (`notificar_recolecta`) REFERENCES `sino_type` (`codi_sino`),
  CONSTRAINT `fk_oficfisi` FOREIGN KEY (`oficina_fisica`) REFERENCES `sino_type` (`codi_sino`),
  CONSTRAINT `fk_operacion` FOREIGN KEY (`operacion_id`) REFERENCES `sde_operacion` (`codi_oper`),
  CONSTRAINT `fk_sefacturaen` FOREIGN KEY (`se_factura_en`) REFERENCES `counter` (`id`),
  CONSTRAINT `fk_visible` FOREIGN KEY (`visible_en_registro_id`) REFERENCES `sino_type` (`codi_sino`),
  CONSTRAINT `fk_zonacod` FOREIGN KEY (`zona_cod`) REFERENCES `sino_type` (`codi_sino`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2021-01-30 20:39:09
