--
-- Host: localhost    Database: pilar74
-- ------------------------------------------------------


--
-- Table structure for table `account`
--

CREATE TABLE `account` (
  `id` int NOT NULL AUTO_INCREMENT,
  `account_master_id` int NOT NULL,
  `salon_mesas_id` int NOT NULL,
  `comanda` int DEFAULT NULL,
  `cuenta` int DEFAULT NULL,
  `asiento` int DEFAULT NULL,
  `menus_items_id` int NOT NULL,
  `cantidad` int unsigned NOT NULL,
  `cantidad_atendida` int unsigned DEFAULT '0',
  `cantidad_cocina` int unsigned DEFAULT '0',
  `valor` decimal(10,2) NOT NULL DEFAULT '0.00',
  `servicio` decimal(10,2) DEFAULT NULL,
  `iva` decimal(10,2) DEFAULT NULL,
  `impo` decimal(10,2) DEFAULT '0.00',
  `total` decimal(10,2) DEFAULT NULL,
  `descuento` decimal(5,2) DEFAULT NULL,
  `tiempo` char(8) DEFAULT NULL,
  `tiempo_final` char(8) DEFAULT NULL,
  `note` varchar(300) DEFAULT NULL,
  `estado` char(1) DEFAULT NULL,
  `send_kitchen` char(1) DEFAULT 'N',
  `usuarios_created_id` int DEFAULT NULL,
  `usuarios_deleted_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `salon_mesas_id` (`salon_mesas_id`,`comanda`,`cuenta`),
  KEY `send_kitchen` (`send_kitchen`),
  KEY `account_master_id` (`account_master_id`,`cuenta`),
  KEY `salon_mesas_id_2` (`salon_mesas_id`,`estado`),
  KEY `menus_items_id` (`menus_items_id`)
) ENGINE=InnoDB AUTO_INCREMENT=152096 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

--
-- Dumping data for table `account`
--


--
-- Table structure for table `account_cuentas`
--

CREATE TABLE `account_cuentas` (
  `id` int NOT NULL AUTO_INCREMENT,
  `account_master_id` int NOT NULL,
  `cuenta` int NOT NULL,
  `clientes_cedula` char(15) DEFAULT NULL,
  `clientes_nombre` varchar(45) DEFAULT NULL,
  `habitacion_id` int DEFAULT NULL,
  `prefijo` char(4) NOT NULL,
  `numero` int DEFAULT NULL,
  `nota` char(150) DEFAULT NULL,
  `tipo_venta` char(1) DEFAULT NULL,
  `propina_fija` char(1) DEFAULT 'N',
  `propina` decimal(12,2) DEFAULT NULL,
  `estado` char(1) NOT NULL DEFAULT 'A',
  `note_entrega` varchar(300) DEFAULT NULL,
  `self_service` char(1) DEFAULT NULL,
  `numcue` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `prefijo` (`prefijo`,`numero`),
  KEY `habitacion_id` (`habitacion_id`),
  KEY `account_master_id` (`account_master_id`,`cuenta`),
  KEY `account_master_id_2` (`account_master_id`,`estado`)
) ENGINE=InnoDB AUTO_INCREMENT=65725 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

--
-- Dumping data for table `account_cuentas`
--


--
-- Table structure for table `account_discount`
--

CREATE TABLE `account_discount` (
  `id` int NOT NULL AUTO_INCREMENT,
  `account_cuentas_id` int unsigned NOT NULL,
  `discount_id` int NOT NULL,
  `tipo` char(1) NOT NULL,
  `valor` decimal(10,2) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `account_cuentas_id` (`account_cuentas_id`),
  KEY `discount_id` (`discount_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `account_discount`
--


--
-- Table structure for table `account_inve`
--

CREATE TABLE `account_inve` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `account_id` int unsigned NOT NULL,
  `codigo` char(7) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `cantidad` decimal(10,3) NOT NULL,
  `cantidad_usuario` int unsigned NOT NULL,
  `tipo` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `estado` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `account_id` (`account_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2640 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `account_inve`
--


--
-- Table structure for table `account_master`
--

CREATE TABLE `account_master` (
  `id` int NOT NULL AUTO_INCREMENT,
  `salon_id` int NOT NULL,
  `salon_mesas_id` int NOT NULL,
  `usuarios_id` int NOT NULL,
  `nombre` char(50) DEFAULT NULL,
  `hora` datetime DEFAULT NULL,
  `hora_atencion` datetime DEFAULT NULL,
  `numero_asientos` int DEFAULT NULL,
  `estado` char(1) NOT NULL DEFAULT '',
  `send_kitchen` char(1) DEFAULT NULL,
  `transaction` varchar(20) DEFAULT NULL,
  `usuarios_id_cancel` int DEFAULT NULL,
  `nombre_usuario_cancel` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `salon_id` (`salon_id`),
  KEY `usuarios_id` (`usuarios_id`),
  KEY `salon_mesas_id` (`salon_mesas_id`,`estado`)
) ENGINE=InnoDB AUTO_INCREMENT=65710 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

--
-- Dumping data for table `account_master`
--


--
-- Table structure for table `account_modifiers`
--

CREATE TABLE `account_modifiers` (
  `id` int NOT NULL AUTO_INCREMENT,
  `account_id` int unsigned NOT NULL,
  `modifiers_id` int NOT NULL DEFAULT '0',
  `valor` decimal(10,2) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `account_id` (`account_id`),
  KEY `modifiers_id` (`modifiers_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7162 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `account_modifiers`
--

INSERT INTO `account_modifiers` VALUES (7064,113247,110,0.00),(7065,113247,109,0.00),(7066,113403,109,0.00),(7067,113403,110,0.00),(7068,113620,109,0.00),(7069,113620,110,0.00),(7070,113737,109,0.00),(7071,113900,109,0.00),(7072,113909,110,0.00),(7073,113909,109,0.00),(7074,114053,109,0.00),(7075,114134,109,0.00),(7076,114195,109,0.00),(7077,114195,110,0.00),(7078,114771,109,0.00),(7079,115619,109,0.00),(7080,116053,109,0.00),(7081,116081,109,0.00),(7082,116164,109,0.00),(7083,116164,110,0.00),(7084,116208,109,0.00),(7085,117069,109,0.00),(7086,117069,110,0.00),(7087,118126,109,0.00),(7088,118607,110,0.00),(7089,119833,109,0.00),(7090,122303,109,0.00),(7091,122303,110,0.00),(7092,122499,110,0.00),(7093,122500,109,0.00),(7094,122499,109,0.00),(7095,122881,110,0.00),(7096,122893,110,0.00),(7097,122893,109,0.00),(7098,124686,109,0.00),(7099,124884,109,0.00),(7100,125594,109,0.00),(7101,125682,110,0.00),(7102,125713,110,0.00),(7103,125780,109,0.00),(7104,125780,110,0.00),(7105,126441,110,0.00),(7106,126529,110,0.00),(7107,127326,109,0.00),(7108,127356,110,0.00),(7109,127740,109,0.00),(7110,127808,109,0.00),(7111,127808,110,0.00),(7112,127951,109,0.00),(7113,128836,109,0.00),(7114,129186,110,0.00),(7116,129300,109,0.00),(7117,129529,109,0.00),(7118,129529,110,0.00),(7119,129843,110,0.00),(7120,130637,110,0.00),(7121,132460,110,0.00),(7122,132700,109,0.00),(7123,132700,110,0.00),(7124,134898,109,0.00),(7125,135315,109,0.00),(7127,137393,109,0.00),(7128,137510,109,0.00),(7129,137510,110,0.00),(7130,137632,110,0.00),(7131,137632,109,0.00),(7132,137635,109,0.00),(7133,137635,110,0.00),(7134,138178,110,0.00),(7135,138751,110,0.00),(7136,139009,109,0.00),(7137,139063,110,0.00),(7138,139377,109,0.00),(7139,140687,110,0.00),(7140,140687,109,0.00),(7141,141909,109,0.00),(7142,142145,109,0.00),(7143,143552,109,0.00),(7144,143773,109,0.00),(7145,143773,110,0.00),(7146,144423,110,0.00),(7147,146451,109,0.00),(7148,146451,110,0.00),(7149,146566,109,0.00),(7150,146566,110,0.00),(7151,146655,109,0.00),(7152,146655,110,0.00),(7153,146681,109,0.00),(7154,146681,110,0.00),(7155,146760,110,0.00),(7156,147352,109,0.00),(7157,147353,109,0.00),(7158,147404,109,0.00),(7159,149373,109,0.00),(7160,149373,110,0.00),(7161,150085,109,0.00);

--
-- Table structure for table `acompanantes`
--

CREATE TABLE `acompanantes` (
  `sexo` tinyint NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `acompanantes`
--


--
-- Table structure for table `audi_cargos_pos`
--

CREATE TABLE `audi_cargos_pos` (
  `id` int NOT NULL AUTO_INCREMENT,
  `producto` varchar(255) DEFAULT NULL,
  `mesa` varchar(255) DEFAULT NULL,
  `comanda` varchar(255) DEFAULT NULL,
  `cantidad` varchar(255) DEFAULT NULL,
  `total` decimal(10,2) DEFAULT NULL,
  `estado` varchar(255) DEFAULT NULL,
  `insert_date` datetime DEFAULT NULL,
  `usuario` varchar(255) DEFAULT NULL,
  `ip_usuario` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `audi_cargos_pos`
--


--
-- Table structure for table `audit`
--

CREATE TABLE `audit` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `controller` varchar(32) NOT NULL,
  `action` varchar(32) NOT NULL,
  `fecha_at` datetime NOT NULL,
  `ipaddress` char(15) NOT NULL,
  `usuarios_id` int NOT NULL,
  `nombre` varchar(120) NOT NULL,
  `nota` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=139395 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=COMPRESSED;

--
-- Dumping data for table `audit`
--

INSERT INTO `audit` VALUES (139394,'close','index','2024-08-13 06:47:09','45.239.107.130',1,'ADMINISTRADOR SOLUTION','REALIZÓ EL CIERRE DEL DÍA DE 2024-08-07');

--
-- Table structure for table `cargos_front`
--

CREATE TABLE `cargos_front` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `numero_folio` int unsigned NOT NULL,
  `numero_cuenta` int unsigned NOT NULL,
  `item` int unsigned NOT NULL,
  `codigo_cargo` int DEFAULT NULL,
  `prefijo_facturacion` char(5) NOT NULL,
  `numero` int unsigned NOT NULL,
  `es_propina` char(1) NOT NULL,
  `estado` char(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `numero_folio` (`numero_folio`,`numero_cuenta`,`item`),
  KEY `prefijo_facturacion` (`prefijo_facturacion`,`numero`)
) ENGINE=InnoDB AUTO_INCREMENT=126578 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `cargos_front`
--


--
-- Table structure for table `cargos_front_detalle`
--

CREATE TABLE `cargos_front_detalle` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `cargos_front_id` int unsigned NOT NULL,
  `account_id` int unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `cargos_front_id` (`cargos_front_id`),
  KEY `account_id` (`account_id`)
) ENGINE=InnoDB AUTO_INCREMENT=113193 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `cargos_front_detalle`
--


--
-- Table structure for table `cash_money`
--

CREATE TABLE `cash_money` (
  `id` int NOT NULL AUTO_INCREMENT,
  `cash_tray_id` int NOT NULL,
  `cantidad` int NOT NULL,
  `valor` decimal(10,2) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `cash_money`
--


--
-- Table structure for table `cash_tray`
--

CREATE TABLE `cash_tray` (
  `id` int NOT NULL AUTO_INCREMENT,
  `descripcion` char(50) NOT NULL,
  `usuarios_id` int DEFAULT NULL,
  `estado` char(1) DEFAULT 'N',
  `fecha` date DEFAULT NULL,
  `hora_abierta` char(8) DEFAULT NULL,
  `hora_cerrada` char(8) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `cash_tray`
--

INSERT INTO `cash_tray` VALUES (1,'CAJA 1',54,'A','2023-06-20','18:13:01','18:12:59');

--
-- Table structure for table `clientes`
--

CREATE TABLE `clientes` (
  `id` tinyint NOT NULL,
  `nombre` tinyint NOT NULL,
  `direccion` tinyint NOT NULL,
  `telefono` tinyint NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `clientes`
--


--
-- Temporary view structure for view `conceptos`
--

/*!50001 DROP VIEW IF EXISTS `conceptos`*/;
/*!50001 CREATE VIEW `conceptos` AS SELECT 
 1 AS `id`,
 1 AS `descripcion`*/;

--
-- Table structure for table `conceptos_cancelacion`
--

CREATE TABLE `conceptos_cancelacion` (
  `id` int NOT NULL AUTO_INCREMENT,
  `nombre` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `conceptos_cancelacion`
--

INSERT INTO `conceptos_cancelacion` VALUES (1,'NO SOLICITADO'),(2,'AUTORIZADO'),(4,'CARGO MAL REALIZADO'),(5,'CANCELADO PEDIDO'),(6,'POR DEMORA'),(7,'CAMBIO DE PLATO');

--
-- Table structure for table `cotizaciones`
--

CREATE TABLE `cotizaciones` (
  `id` int NOT NULL AUTO_INCREMENT,
  `nit_prov` char(20) DEFAULT NULL,
  `cod_prov` char(20) DEFAULT NULL,
  `item` char(15) DEFAULT NULL,
  `unidad` char(3) DEFAULT NULL,
  `precio` decimal(14,2) DEFAULT NULL,
  `iva` smallint DEFAULT NULL,
  `ico` smallint DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `cotizaciones`
--


--
-- Table structure for table `cuentas`
--

CREATE TABLE `cuentas` (
  `numfol` tinyint NOT NULL,
  `numcue` tinyint NOT NULL,
  `nombre` tinyint NOT NULL,
  `habitacion_id` tinyint NOT NULL,
  `estado` tinyint NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `cuentas`
--


--
-- Table structure for table `customers`
--

CREATE TABLE `customers` (
  `identification_type` char(3) NOT NULL DEFAULT '',
  `number` varchar(40) NOT NULL DEFAULT '',
  `nombre` varchar(120) DEFAULT NULL,
  `status` char(1) DEFAULT NULL,
  PRIMARY KEY (`identification_type`,`number`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `customers`
--


--
-- Table structure for table `datos`
--

CREATE TABLE `datos` (
  `id` int NOT NULL,
  `documento` char(10) NOT NULL,
  `nit` char(13) NOT NULL,
  `nombre_hotel` char(50) NOT NULL,
  `nombre_cadena` char(50) NOT NULL,
  `direccion` char(70) NOT NULL DEFAULT '',
  `telefonos` char(40) NOT NULL DEFAULT '',
  `fax` char(30) NOT NULL,
  `po_box` char(30) NOT NULL,
  `ciudad` char(40) NOT NULL,
  `pais` char(30) NOT NULL,
  `entidad` char(10) NOT NULL,
  `moneda` char(15) NOT NULL,
  `centavos` char(15) NOT NULL,
  `nota_contribuyentes` varchar(80) NOT NULL DEFAULT '',
  `fecha` date NOT NULL,
  `print_type` char(1) DEFAULT NULL,
  `print_server` varchar(45) DEFAULT NULL,
  `version` varchar(10) NOT NULL,
  `pecl_http` char(1) DEFAULT NULL,
  `default_nit` varchar(20) DEFAULT NULL,
  `tipo_factura` char(1) DEFAULT NULL,
  `tipo_orden` char(1) DEFAULT NULL,
  `send_kitchen` char(1) DEFAULT NULL,
  `valida_impoconsumo` char(1) DEFAULT NULL,
  `valida_propina` char(1) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `datos`
--

INSERT INTO `datos` VALUES (1,'NIT','900.611.953-0','SOCIEDAD HOTELERA CHICO SAS','EK HOTELES','CALLE 90 # 11-13','571-7455757','571-7455757','0','Bogota','169','DIAN','PESOS','CENTAVOS','VA REGIMEN COMUN NO SOMOS GRANDES CONTRIBUYENTES - SOMOS ACTIVIDAD ECONOMICA 551','2024-08-08','C','10.20.30.99','6.0.3','2',NULL,'D','D',NULL,'1','1');

--
-- Table structure for table `detalle_factura`
--

CREATE TABLE `detalle_factura` (
  `id` int NOT NULL AUTO_INCREMENT,
  `prefijo_facturacion` char(12) NOT NULL DEFAULT '',
  `consecutivo_facturacion` int NOT NULL DEFAULT '0',
  `tipo` char(1) NOT NULL DEFAULT '',
  `account_id` int unsigned NOT NULL,
  `menus_items_id` int NOT NULL DEFAULT '0',
  `menus_items_nombre` text NOT NULL,
  `porcentaje_iva` int NOT NULL,
  `porcentaje_impoconsumo` int DEFAULT '0',
  `cantidad` int NOT NULL DEFAULT '0',
  `descuento` int NOT NULL,
  `valor` decimal(10,2) NOT NULL DEFAULT '0.00',
  `iva` decimal(10,2) NOT NULL,
  `impo` decimal(10,2) DEFAULT '0.00',
  `servicio` decimal(10,2) NOT NULL,
  `total` decimal(10,2) NOT NULL DEFAULT '0.00',
  PRIMARY KEY (`id`),
  KEY `prefijo_facturacion` (`prefijo_facturacion`,`consecutivo_facturacion`,`tipo`),
  KEY `account_id` (`account_id`),
  KEY `menus_items_id` (`menus_items_id`)
) ENGINE=InnoDB AUTO_INCREMENT=151766 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `detalle_factura`
--


--
-- Table structure for table `discount`
--

CREATE TABLE `discount` (
  `id` int NOT NULL AUTO_INCREMENT,
  `nombre` char(40) NOT NULL,
  `tipo` char(1) NOT NULL,
  `valor` decimal(10,2) NOT NULL,
  `estado` char(1) DEFAULT 'A',
  PRIMARY KEY (`id`),
  KEY `estado` (`estado`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `discount`
--


--
-- Table structure for table `empresa1`
--

CREATE TABLE `empresa1` (
  `f_cierref` tinyint NOT NULL,
  `f_cierrep` tinyint NOT NULL,
  `ano_c` tinyint NOT NULL,
  `base_ret` tinyint NOT NULL,
  `otros` tinyint NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `empresa1`
--


--
-- Table structure for table `factura`
--

CREATE TABLE `factura` (
  `id` int NOT NULL AUTO_INCREMENT,
  `prefijo_facturacion` char(12) DEFAULT NULL,
  `consecutivo_facturacion` int NOT NULL DEFAULT '0',
  `resolucion` varchar(30) NOT NULL,
  `fecha_resolucion` date NOT NULL,
  `numero_inicial` int unsigned NOT NULL,
  `numero_final` int unsigned NOT NULL,
  `account_master_id` int DEFAULT NULL,
  `cuenta` int unsigned NOT NULL,
  `comanda` varchar(120) NOT NULL,
  `documento` char(10) NOT NULL DEFAULT '',
  `nit` char(13) NOT NULL DEFAULT '',
  `nombre_hotel` char(50) NOT NULL DEFAULT '',
  `nombre_cadena` char(50) NOT NULL DEFAULT '',
  `direccion` char(70) NOT NULL DEFAULT '',
  `telefonos` char(40) NOT NULL DEFAULT '',
  `fax` char(30) NOT NULL DEFAULT '',
  `po_box` char(30) NOT NULL DEFAULT '',
  `ciudad` char(40) NOT NULL DEFAULT '',
  `pais` char(30) NOT NULL DEFAULT '',
  `entidad` char(10) NOT NULL DEFAULT '',
  `moneda` char(15) NOT NULL DEFAULT '',
  `centavos` char(15) NOT NULL DEFAULT '',
  `nota_contribuyentes` varchar(300) NOT NULL DEFAULT '',
  `cedula` char(13) NOT NULL DEFAULT '',
  `nombre` char(60) NOT NULL DEFAULT '',
  `clientes_direccion` char(60) DEFAULT NULL,
  `clientes_telefono` char(30) DEFAULT NULL,
  `habitacion_id` int NOT NULL,
  `habitacion_numero` varchar(6) NOT NULL,
  `salon_id` int DEFAULT NULL,
  `salon_nombre` char(40) NOT NULL DEFAULT '',
  `salonmesas_numero` varchar(5) NOT NULL,
  `numero_personas` int DEFAULT NULL,
  `usuarios_id` int DEFAULT NULL,
  `usuarios_nombre` char(30) NOT NULL DEFAULT '',
  `fecha` date NOT NULL,
  `hora` char(5) NOT NULL,
  `tipo` char(1) NOT NULL DEFAULT '',
  `tipo_venta` char(1) DEFAULT NULL,
  `leyenda_propina` char(1) NOT NULL DEFAULT 'N',
  `texto_propina` text,
  `texto_impresion` text,
  `note_entrega` varchar(300) DEFAULT NULL,
  `propina` decimal(10,2) DEFAULT NULL,
  `total_alimentos` decimal(10,2) NOT NULL,
  `total_bebidas` decimal(10,2) NOT NULL,
  `subtotal` decimal(10,2) NOT NULL,
  `total` decimal(10,2) NOT NULL DEFAULT '0.00',
  `total_iva` decimal(10,2) NOT NULL DEFAULT '0.00',
  `total_impoconsumo` decimal(10,2) DEFAULT '0.00',
  `total_servicio` decimal(10,2) NOT NULL DEFAULT '0.00',
  `estado` char(1) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `salon_id` (`salon_id`),
  KEY `prefijo_facturacion` (`prefijo_facturacion`,`consecutivo_facturacion`,`tipo`),
  KEY `estado` (`estado`),
  KEY `account_master_id` (`account_master_id`,`cuenta`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `factura`
--


--
-- Table structure for table `formas_pago`
--

CREATE TABLE `formas_pago` (
  `id` tinyint NOT NULL,
  `detalle` tinyint NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `formas_pago`
--


--
-- Table structure for table `habitacion_historico`
--

CREATE TABLE `habitacion_historico` (
  `id` tinyint NOT NULL,
  `tipdoc` tinyint NOT NULL,
  `cedula` tinyint NOT NULL,
  `nombre` tinyint NOT NULL,
  `numhab` tinyint NOT NULL,
  `numero_adultos` tinyint NOT NULL,
  `numero_ninos` tinyint NOT NULL,
  `numero_infantes` tinyint NOT NULL,
  `nota` tinyint NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `habitacion_historico`
--


--
-- Table structure for table `habitaciones`
--

CREATE TABLE `habitaciones` (
  `id` tinyint NOT NULL,
  `clase` tinyint NOT NULL,
  `piso` tinyint NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `habitaciones`
--


--
-- Table structure for table `invepos`
--

CREATE TABLE `invepos` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `prefac` char(5) NOT NULL,
  `numfac` int unsigned NOT NULL,
  `fecha` date NOT NULL,
  `almacen` int unsigned NOT NULL,
  `centro_costo` int unsigned NOT NULL,
  `tipo` char(1) NOT NULL,
  `codigo` char(15) NOT NULL,
  `menus_items_id` int unsigned NOT NULL,
  `cantidad` int unsigned NOT NULL,
  `cantidadu` int unsigned NOT NULL,
  `estado` char(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=962 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `invepos`
--


--
-- Table structure for table `invoice_print`
--

CREATE TABLE `invoice_print` (
  `type` char(1) NOT NULL,
  `size` smallint DEFAULT NULL,
  `list` smallint NOT NULL,
  `position` varchar(8) DEFAULT NULL COMMENT 'C=center;I=left;D=right',
  `pre` char(5) DEFAULT NULL,
  `value` text
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `invoice_print`
--


--
-- Table structure for table `menus`
--

CREATE TABLE `menus` (
  `id` int NOT NULL AUTO_INCREMENT,
  `nombre` varchar(45) NOT NULL,
  `nombre_pedido` varchar(45) NOT NULL,
  `image` varchar(40) DEFAULT NULL,
  `estado` char(1) NOT NULL DEFAULT 'A',
  PRIMARY KEY (`id`),
  KEY `estado` (`estado`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

--
-- Dumping data for table `menus`
--


--
-- Table structure for table `menus_items`
--

CREATE TABLE `menus_items` (
  `id` int NOT NULL AUTO_INCREMENT,
  `menus_id` int NOT NULL,
  `nombre` varchar(45) NOT NULL,
  `nombre_pedido` varchar(45) NOT NULL,
  `codigo_barras` varchar(100) DEFAULT NULL,
  `tipo` char(1) DEFAULT NULL,
  `image` char(40) DEFAULT NULL,
  `valor` decimal(16,2) DEFAULT NULL,
  `costo` decimal(7,2) DEFAULT NULL,
  `porcentaje_iva` decimal(5,2) DEFAULT NULL,
  `porcentaje_impoconsumo` decimal(5,2) DEFAULT '0.00',
  `porcentaje_servicio` decimal(5,2) DEFAULT NULL,
  `tipo_costo` char(1) NOT NULL DEFAULT 'N',
  `codigo_referencia` char(15) DEFAULT NULL,
  `descontar` char(1) NOT NULL DEFAULT 'N',
  `cambio_precio` char(1) DEFAULT NULL,
  `estado` char(1) NOT NULL DEFAULT 'A',
  `cubierto` char(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `estado` (`estado`),
  KEY `menus_id` (`menus_id`),
  KEY `codigo_referencia` (`codigo_referencia`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

--
-- Dumping data for table `menus_items`
--


--
-- Table structure for table `menus_items_day`
--

CREATE TABLE `menus_items_day` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `salon_id` int unsigned NOT NULL,
  `menus_items_id` int unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `menus_items_day`
--


--
-- Table structure for table `menus_items_modifiers`
--

CREATE TABLE `menus_items_modifiers` (
  `id` int NOT NULL AUTO_INCREMENT,
  `menus_items_id` int unsigned NOT NULL,
  `modifiers_id` int unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `menus_items_id` (`menus_items_id`),
  KEY `modifiers_id` (`modifiers_id`)
) ENGINE=InnoDB AUTO_INCREMENT=562 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `menus_items_modifiers`
--

INSERT INTO `menus_items_modifiers` VALUES (560,453,109),(561,453,110);

--
-- Table structure for table `modifiers`
--

CREATE TABLE `modifiers` (
  `id` int NOT NULL AUTO_INCREMENT,
  `nombre` varchar(45) NOT NULL,
  `nombre_pedido` varchar(45) NOT NULL,
  `tipo` char(1) NOT NULL,
  `valor` decimal(10,2) DEFAULT NULL,
  `tipo_costo` char(1) DEFAULT 'N',
  `descontar` char(1) DEFAULT 'N',
  `codigo_referencia` char(15) DEFAULT NULL,
  `estado` char(1) DEFAULT 'A',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=111 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `modifiers`
--


--
-- Table structure for table `movimiento_folio`
--

CREATE TABLE `movimiento_folio` (
  `folio` tinyint NOT NULL,
  `cuenta` tinyint NOT NULL,
  `item` tinyint NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `movimiento_folio`
--


--
-- Table structure for table `pagos_factura`
--

CREATE TABLE `pagos_factura` (
  `id` int NOT NULL AUTO_INCREMENT,
  `prefijo_facturacion` char(5) DEFAULT NULL,
  `consecutivo_facturacion` int DEFAULT NULL,
  `tipo` char(1) NOT NULL,
  `formas_pago_id` int DEFAULT NULL,
  `pago` decimal(16,2) DEFAULT NULL,
  `cargo_plan` char(1) DEFAULT NULL,
  `habitacion_id` int DEFAULT NULL,
  `cuenta` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `prefijo_facturacion` (`prefijo_facturacion`,`consecutivo_facturacion`,`tipo`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

--
-- Dumping data for table `pagos_factura`
--


--
-- Table structure for table `permisos`
--

CREATE TABLE `permisos` (
  `id` int NOT NULL AUTO_INCREMENT,
  `usuarios_id` int DEFAULT NULL,
  `salon_id` int DEFAULT NULL,
  `estado` char(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `salon_id` (`salon_id`),
  KEY `salon_id_2` (`salon_id`,`usuarios_id`,`estado`)
) ENGINE=InnoDB AUTO_INCREMENT=209 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

--
-- Dumping data for table `permisos`
--

INSERT INTO `permisos` VALUES (208,57,1,'A'),(1,1,58,'A'),(5,2,58,'A'),(30,3,58,'A'),(9,4,58,'I'),(12,5,58,'A'),(4,6,58,'A'),(2,7,58,'A'),(28,8,58,'A'),(15,9,58,'A'),(17,10,58,'A'),(22,11,58,'A'),(24,12,58,'A'),(25,13,58,'A'),(54,14,58,'A'),(58,15,58,'A'),(66,16,58,'A'),(62,17,58,'A'),(68,18,58,'A'),(74,19,58,'A'),(78,20,58,'A'),(82,21,58,'A'),(86,22,58,'A'),(162,23,58,'A'),(90,24,58,'A'),(94,25,58,'A'),(98,26,58,'A'),(102,27,58,'A'),(106,28,58,'A'),(110,29,58,'A'),(114,30,58,'A'),(118,31,58,'A'),(122,32,58,'A'),(154,33,58,'A'),(126,34,58,'A'),(130,36,58,'A'),(135,38,58,'A'),(158,39,58,'A'),(138,40,58,'A'),(141,41,58,'A'),(147,42,58,'A'),(150,43,58,'A'),(186,44,58,'A'),(166,45,58,'A'),(170,47,58,'A'),(173,48,58,'A'),(176,49,58,'A'),(183,50,58,'A'),(190,51,58,'A'),(194,52,58,'A'),(198,53,58,'A'),(202,54,58,'A'),(206,55,58,'A'),(45,1,59,'A'),(48,2,59,'A'),(51,3,59,'A'),(49,4,59,'I'),(11,5,59,'A'),(3,6,59,'A'),(47,7,59,'A'),(32,8,59,'A'),(14,9,59,'A'),(19,10,59,'A'),(21,11,59,'A'),(50,12,59,'I'),(53,14,59,'A'),(57,15,59,'A'),(65,16,59,'A'),(61,17,59,'A'),(69,18,59,'A'),(73,19,59,'A'),(77,20,59,'A'),(81,21,59,'A'),(85,22,59,'A'),(161,23,59,'A'),(89,24,59,'A'),(93,25,59,'A'),(97,26,59,'A'),(101,27,59,'A'),(105,28,59,'A'),(109,29,59,'A'),(113,30,59,'A'),(117,31,59,'A'),(121,32,59,'A'),(153,33,59,'A'),(125,34,59,'A'),(129,36,59,'A'),(133,38,59,'A'),(156,39,59,'A'),(137,40,59,'A'),(143,41,59,'A'),(145,42,59,'A'),(148,43,59,'A'),(185,44,59,'A'),(165,45,59,'A'),(169,47,59,'A'),(174,48,59,'A'),(178,49,59,'A'),(181,50,59,'A'),(189,51,59,'A'),(193,52,59,'A'),(197,53,59,'A'),(201,54,59,'A'),(205,55,59,'A'),(44,1,60,'A'),(29,2,60,'A'),(7,3,60,'A'),(8,4,60,'I'),(10,5,60,'A'),(16,6,60,'A'),(6,7,60,'A'),(27,8,60,'A'),(13,9,60,'A'),(18,10,60,'A'),(20,11,60,'A'),(23,12,60,'A'),(26,13,60,'A'),(52,14,60,'A'),(56,15,60,'A'),(64,16,60,'A'),(60,17,60,'A'),(70,18,60,'A'),(72,19,60,'A'),(76,20,60,'A'),(80,21,60,'A'),(84,22,60,'A'),(160,23,60,'A'),(88,24,60,'A'),(92,25,60,'A'),(96,26,60,'A'),(100,27,60,'A'),(104,28,60,'A'),(108,29,60,'A'),(112,30,60,'A'),(116,31,60,'A'),(120,32,60,'A'),(152,33,60,'A'),(124,34,60,'A'),(128,36,60,'A'),(132,38,60,'A'),(157,39,60,'A'),(136,40,60,'A'),(140,41,60,'A'),(144,42,60,'A'),(149,43,60,'A'),(184,44,60,'A'),(164,45,60,'A'),(168,47,60,'A'),(175,48,60,'A'),(179,49,60,'A'),(182,50,60,'A'),(188,51,60,'A'),(192,52,60,'A'),(196,53,60,'A'),(200,54,60,'A'),(204,55,60,'A'),(46,1,61,'A'),(38,2,61,'A'),(43,3,61,'A'),(39,4,61,'I'),(31,5,61,'A'),(37,6,61,'A'),(34,7,61,'A'),(33,8,61,'A'),(42,9,61,'A'),(35,10,61,'A'),(41,11,61,'A'),(40,12,61,'A'),(36,13,61,'A'),(55,14,61,'A'),(59,15,61,'A'),(67,16,61,'A'),(63,17,61,'A'),(71,18,61,'A'),(75,19,61,'A'),(79,20,61,'A'),(83,21,61,'A'),(87,22,61,'A'),(163,23,61,'A'),(91,24,61,'A'),(95,25,61,'A'),(99,26,61,'A'),(103,27,61,'A'),(107,28,61,'A'),(111,29,61,'A'),(115,30,61,'A'),(119,31,61,'A'),(123,32,61,'A'),(155,33,61,'A'),(127,34,61,'A'),(131,36,61,'A'),(134,38,61,'A'),(159,39,61,'A'),(139,40,61,'A'),(142,41,61,'A'),(146,42,61,'A'),(151,43,61,'A'),(187,44,61,'A'),(167,45,61,'A'),(171,47,61,'A'),(172,48,61,'A'),(177,49,61,'A'),(180,50,61,'A'),(191,51,61,'A'),(195,52,61,'A'),(199,53,61,'A'),(203,54,61,'A'),(207,55,61,'A');

--
-- Table structure for table `planes`
--

CREATE TABLE `planes` (
  `numfol` tinyint NOT NULL,
  `descripcion` tinyint NOT NULL,
  `fecini` tinyint NOT NULL,
  `fecfin` tinyint NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `planes`
--


--
-- Table structure for table `planificador`
--

CREATE TABLE `planificador` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `fecha` date NOT NULL,
  `tipo_servicio_id` int unsigned NOT NULL,
  `salon_id` int unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fecha` (`fecha`,`tipo_servicio_id`,`salon_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `planificador`
--


--
-- Table structure for table `planificador_detalle`
--

CREATE TABLE `planificador_detalle` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `planificador_id` int unsigned NOT NULL,
  `menus_items_id` int unsigned NOT NULL,
  `cantidad` int unsigned NOT NULL,
  `costo` decimal(10,2) NOT NULL,
  `valor` decimal(10,2) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `planificador_detalle`
--


--
-- Table structure for table `popularidad`
--

CREATE TABLE `popularidad` (
  `id` int NOT NULL AUTO_INCREMENT,
  `cantidad` int NOT NULL,
  `valor` decimal(22,2) NOT NULL,
  `costo` decimal(22,2) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `popularidad`
--


--
-- Table structure for table `printers`
--

CREATE TABLE `printers` (
  `id` int NOT NULL AUTO_INCREMENT,
  `nombre` varchar(40) DEFAULT NULL,
  `ubicacion` varchar(120) DEFAULT NULL,
  `estado` char(1) NOT NULL DEFAULT 'A',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `printers`
--

INSERT INTO `printers` VALUES (1,'COCINA','POS-1','A'),(2,'BAR','POS-2','A');

--
-- Table structure for table `recetas`
--

CREATE TABLE `recetas` (
  `almacen` tinyint NOT NULL,
  `numero_rec` tinyint NOT NULL,
  `nombre` tinyint NOT NULL,
  `num_personas` tinyint NOT NULL,
  `tipo` tinyint NOT NULL,
  `porc_varios` tinyint NOT NULL,
  `precio_venta` tinyint NOT NULL,
  `iva` tinyint NOT NULL,
  `precio_costo` tinyint NOT NULL,
  `porc_costo` tinyint NOT NULL,
  `costoent` tinyint NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `recetas`
--


--
-- Table structure for table `referencias`
--

CREATE TABLE `referencias` (
  `id` tinyint NOT NULL,
  `nombre` tinyint NOT NULL,
  `nombre_unido` tinyint NOT NULL,
  `tipo` tinyint NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `referencias`
--


--
-- Table structure for table `salon`
--

CREATE TABLE `salon` (
  `id` int NOT NULL AUTO_INCREMENT,
  `nombre` varchar(50) NOT NULL,
  `autorizacion` char(25) DEFAULT NULL,
  `fecha_autorizacion` date DEFAULT NULL,
  `prefijo_facturacion` char(12) NOT NULL,
  `consecutivo_inicial` int unsigned NOT NULL,
  `consecutivo_final` int unsigned NOT NULL,
  `consecutivo_facturacion` int unsigned NOT NULL,
  `consecutivo_orden` int unsigned NOT NULL,
  `prefijo_orden` char(5) DEFAULT NULL,
  `tipo_comanda` char(1) DEFAULT NULL,
  `consecutivo_comanda` int DEFAULT NULL,
  `usuarios_hotel_id` int unsigned NOT NULL,
  `conceptos_id` int unsigned NOT NULL,
  `centro_costo` int unsigned DEFAULT NULL,
  `porcentaje_servicio` int DEFAULT NULL,
  `pide_asientos` char(1) NOT NULL DEFAULT 'S',
  `pide_personas` char(1) NOT NULL DEFAULT 'S',
  `leyenda_propina` char(1) DEFAULT NULL,
  `texto_propina` text,
  `propina_automatica` char(1) DEFAULT NULL,
  `venta_a` char(1) DEFAULT NULL,
  `texto_impresion` text,
  `descarga_online` char(1) DEFAULT 'N',
  `ancho_mesas` int unsigned NOT NULL,
  `alto_mesas` int unsigned NOT NULL,
  `cierre_pedidos` char(1) DEFAULT 'N',
  `tipo_venta_default` char(1) DEFAULT NULL,
  `estado` char(1) NOT NULL DEFAULT 'A',
  PRIMARY KEY (`id`),
  KEY `estado` (`estado`),
  KEY `conceptos_id` (`conceptos_id`),
  KEY `usuarios_hotel_id` (`usuarios_hotel_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `salon`
--

INSERT INTO `salon` VALUES (1,'RESTAURANTE ILAR 74','.','2024-01-01','PCB',1,1000,1,1,'ORES','A',1,1,67,1112,0,'N','S','S','leyenda propina','S','C',NULL,'N',8,11,'N','H','A');

--
-- Table structure for table `salon_menus_items`
--

CREATE TABLE `salon_menus_items` (
  `id` int NOT NULL AUTO_INCREMENT,
  `salon_id` int NOT NULL,
  `menus_items_id` int NOT NULL,
  `valor` decimal(16,2) DEFAULT NULL,
  `descarga` char(1) NOT NULL DEFAULT 'S',
  `almacen` int DEFAULT NULL,
  `conceptos_id` int DEFAULT NULL,
  `printers_id` int DEFAULT NULL,
  `printers_id2` int DEFAULT NULL,
  `screens_id` int unsigned NOT NULL,
  `estado` char(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `salon_id` (`salon_id`),
  KEY `menus_items_id` (`menus_items_id`),
  KEY `salon_id_2` (`salon_id`,`menus_items_id`,`estado`),
  KEY `screens_id` (`screens_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `salon_menus_items`
--


--
-- Table structure for table `salon_mesas`
--

CREATE TABLE `salon_mesas` (
  `id` int NOT NULL AUTO_INCREMENT,
  `salon_id` int NOT NULL,
  `vpos` char(2) NOT NULL DEFAULT '',
  `hpos` char(2) NOT NULL DEFAULT '',
  `numero` varchar(5) DEFAULT NULL,
  `estado` char(1) DEFAULT 'N',
  PRIMARY KEY (`id`),
  KEY `salon_id` (`salon_id`,`vpos`,`hpos`),
  KEY `salon_id_2` (`salon_id`,`estado`)
) ENGINE=InnoDB AUTO_INCREMENT=1424 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `salon_mesas`
--


--
-- Table structure for table `salon_tipo_venta`
--

CREATE TABLE `salon_tipo_venta` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `salon_id` int unsigned NOT NULL,
  `tipo_venta_id` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `salon_id` (`salon_id`),
  KEY `tipo_venta_id` (`tipo_venta_id`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `salon_tipo_venta`
--


--
-- Table structure for table `screens`
--

CREATE TABLE `screens` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `nombre` varchar(70) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `estado` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `screens`
--

INSERT INTO `screens` VALUES (1,'RESTAURANTE','A'),(2,'BAR','A');

--
-- Table structure for table `socios_actual`
--

CREATE TABLE `socios_actual` (
  `accion` tinyint NOT NULL,
  `numfol` tinyint NOT NULL,
  `numhab` tinyint NOT NULL,
  `nombre` tinyint NOT NULL,
  `estado` tinyint NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `socios_actual`
--


--
-- Table structure for table `tipo_servicio`
--

CREATE TABLE `tipo_servicio` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `nombre` varchar(35) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `estado` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `tipo_servicio`
--

INSERT INTO `tipo_servicio` VALUES (1,'ROOM-SERVICE','A');

--
-- Table structure for table `tipo_venta`
--

CREATE TABLE `tipo_venta` (
  `id` char(1) NOT NULL,
  `detalle` varchar(45) NOT NULL,
  `costo` char(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tipo_venta`
--

INSERT INTO `tipo_venta` VALUES ('C','CORTESIA','S'),('F','FACTURA','N'),('H','CARGO A HABITACION','N'),('P','PLAN','S'),('U','FUNCIONARIO','S');

--
-- Table structure for table `usuarios`
--

CREATE TABLE `usuarios` (
  `id` int NOT NULL AUTO_INCREMENT,
  `clave` char(40) NOT NULL,
  `nombre` char(50) NOT NULL DEFAULT '',
  `perfil` varchar(24) DEFAULT NULL,
  `estado` char(1) DEFAULT 'A',
  PRIMARY KEY (`id`),
  KEY `clave` (`clave`,`estado`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `usuarios`
--


--
-- Temporary view structure for view `usuarios_hotel`
--

/*!50001 DROP VIEW IF EXISTS `usuarios_hotel`*/;
/*!50001 CREATE VIEW `usuarios_hotel` AS SELECT 
 1 AS `id`,
 1 AS `nombre`*/;

--
-- Table structure for table `usuarios_pos`
--

CREATE TABLE `usuarios_pos` (
  `id` int NOT NULL AUTO_INCREMENT,
  `clave` char(40) NOT NULL,
  `nombre` char(50) NOT NULL DEFAULT '',
  `perfil` varchar(24) DEFAULT NULL,
  `estado` char(1) DEFAULT 'A',
  PRIMARY KEY (`id`),
  KEY `clave` (`clave`,`estado`)
) ENGINE=InnoDB AUTO_INCREMENT=58 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `usuarios_pos`
--

INSERT INTO `usuarios_pos` VALUES (1,'45a6b8a170126a7ee692898ba02d83cb97790d02','ADMINISTRADOR SOLUTION','Administradores','A'),(57,'5874cec38b8f69b2c74aef30f48fbe2abbf55082','JEISON JEISON','Administradores','A');

--
-- Table structure for table `ventas_default`
--

CREATE TABLE `ventas_default` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `tipo_venta_id` char(1) NOT NULL,
  `cedula` varchar(15) NOT NULL,
  `valor_minimo` decimal(10,2) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `tipo_venta_id` (`tipo_venta_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `ventas_default`
--

INSERT INTO `ventas_default` VALUES (1,'U','80083915',0.00),(2,'C','900611953',0.00);

--
-- Dumping routines for database 'pilar74'
--

--
-- Final view structure for view `conceptos`
--

/*!50001 DROP VIEW IF EXISTS `conceptos`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `conceptos` AS select `hilar74`.`cargos`.`codcar` AS `id`,`hilar74`.`cargos`.`descripcion` AS `descripcion` from `hilar74`.`cargos` where ((`hilar74`.`cargos`.`tipmov` = _utf8mb3'D') and (`hilar74`.`cargos`.`descaj` <> _utf8mb3'S') and (`hilar74`.`cargos`.`estado` = _utf8mb3'A')) */;

--
-- Final view structure for view `usuarios_hotel`
--

/*!50001 DROP VIEW IF EXISTS `usuarios_hotel`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `usuarios_hotel` AS select `hilar74`.`usuarios`.`codusu` AS `id`,`hilar74`.`usuarios`.`nombre` AS `nombre` from `hilar74`.`usuarios` where (`hilar74`.`usuarios`.`estado` = _utf8mb3'A') */;


