CREATE TABLE `222RES` (
  `RESCodigo` int(11) NOT NULL AUTO_INCREMENT,
  `RESNombre` char(80) COLLATE utf8_spanish_ci NOT NULL DEFAULT '',
  `RESCodAgente` int(11) NOT NULL DEFAULT '0',
  `RESLink1_PER` int(11) NOT NULL DEFAULT '0',
  `RESLink1_HOT` int(11) NOT NULL,
  `RESFecha1` date DEFAULT NULL,
  `RESFecha2` date DEFAULT NULL,
  `RESLista1` enum('---','0-Creando','1-Solicitando','2-Pagando','3-Verificando Pago','4-Confirmada','9-Reservada') COLLATE utf8_spanish_ci NOT NULL,
  `RESBloque5` char(0) COLLATE utf8_spanish_ci NOT NULL DEFAULT '',
  `RESBloque1` char(0) COLLATE utf8_spanish_ci NOT NULL DEFAULT '',
  `RESBloque2` char(0) COLLATE utf8_spanish_ci NOT NULL DEFAULT '',
  `RESLista2` enum('---','1-Tarjeta Crédito','2-Tarjeta Débito','3-Transferencia Misma Banco','4-Transferencia Interbancaria','5-Depósito Efectivo','6-Depósito Cheque','7-Cheques','8-Efectivo') COLLATE utf8_spanish_ci NOT NULL,
  `RESLista3` enum('---','Bs','BsF','US$','€') COLLATE utf8_spanish_ci NOT NULL,
  `RESMonto1` double NOT NULL DEFAULT '0',
  `RESFecha3` date DEFAULT NULL,
  `RESHora1` time NOT NULL DEFAULT '00:00:00',
  `RESFecha4` date DEFAULT NULL,
  `RESHora2` time NOT NULL DEFAULT '00:00:00',
  `RESFecha5` date DEFAULT NULL,
  `RESHora3` time NOT NULL DEFAULT '00:00:00',
  `RESBloque3` char(0) COLLATE utf8_spanish_ci NOT NULL DEFAULT '',
  `RESEspecial` char(0) COLLATE utf8_spanish_ci NOT NULL DEFAULT '',
  `RESCant5` int(11) NOT NULL DEFAULT '0',
  `RESCant6` int(11) NOT NULL DEFAULT '0',
  `RESCheckbox1` bit(1) NOT NULL DEFAULT b'0',
  `RESCheckbox2` bit(1) NOT NULL DEFAULT b'0',
  `RESBloque4` char(0) COLLATE utf8_spanish_ci NOT NULL DEFAULT '',
  `RESLinea1` char(15) COLLATE utf8_spanish_ci NOT NULL,
  `RESLista4` enum('---','1-Hotel','2-Cliente','3-LPT','4-Agencia') COLLATE utf8_spanish_ci NOT NULL,
  `RESCheckbox3` bit(1) NOT NULL DEFAULT b'0',
  `RESCheckbox4` bit(1) NOT NULL DEFAULT b'0',
  `RESLista5` enum('---','Abandonada','Cancelada hotel','Cancelada pasajero','No show','Pago insuficiente','Perdida','Pago invalido') COLLATE utf8_spanish_ci NOT NULL,
  `RESLinea2` char(40) COLLATE utf8_spanish_ci NOT NULL DEFAULT '',
  `RESLinea3` char(40) COLLATE utf8_spanish_ci NOT NULL DEFAULT '',
  `RESLinea4` char(40) COLLATE utf8_spanish_ci NOT NULL DEFAULT '',
  `RESBloque6` char(0) COLLATE utf8_spanish_ci NOT NULL DEFAULT '',
  `RESLista6` enum('---','Oficina','Ipostel','Courier') COLLATE utf8_spanish_ci NOT NULL,
  `RESLink1_USR` int(11) NOT NULL,
  `RESLinea5` char(40) COLLATE utf8_spanish_ci NOT NULL DEFAULT '',
  `RESMonto2` double NOT NULL DEFAULT '0',
  `RESMonto3` double NOT NULL DEFAULT '0',
  `RESLista7` enum('---','1-Pago Parcial','2-Pago Total') COLLATE utf8_spanish_ci NOT NULL,
  `RESLinea6` char(40) COLLATE utf8_spanish_ci NOT NULL DEFAULT '',
  `RESLinea7` char(40) COLLATE utf8_spanish_ci NOT NULL DEFAULT '',
  `RESCheckbox5` bit(1) NOT NULL DEFAULT b'0',
  `RESCheckbox6` bit(1) NOT NULL DEFAULT b'0',
  `RESMonto4` double NOT NULL DEFAULT '0',
  `RESMonto5` double NOT NULL DEFAULT '0',
  `RESMonto6` double NOT NULL DEFAULT '0',
  `RESLista8` enum('---','Local','Ids','Web') COLLATE utf8_spanish_ci NOT NULL,
  `RESTimeStamp1` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`RESCodigo`),
  UNIQUE KEY `RESLinea1` (`RESLinea1`),
  KEY `RESLink1_HOT` (`RESLink1_HOT`),
  KEY `RESLink1_USR` (`RESLink1_USR`),
  CONSTRAINT `222RES-222HOT` FOREIGN KEY (`RESLink1_HOT`) REFERENCES `222HOT` (`HOTCodigo`),
  CONSTRAINT `222RES-222USR` FOREIGN KEY (`RESLink1_USR`) REFERENCES `222USR` (`USRCodigo`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci;