-- tupi_web.vpos definition

CREATE TABLE `vpos` (
  `VpCod` int NOT NULL AUTO_INCREMENT,
  `UsrCod` int NOT NULL,
  `VpMonto` bigint NOT NULL,
  `VpDate` datetime DEFAULT NULL,
  `VpStatus` enum('pendiente','aprobado','rechazado','cancelado') NOT NULL DEFAULT 'pendiente',
  `VpOrigin` varchar(255) DEFAULT NULL,
  `mi_carrito` int NOT NULL,
  `process_id` varchar(255) DEFAULT NULL,
  `token` varchar(256) DEFAULT NULL,
  `response` varchar(256) DEFAULT NULL,
  `response_details` varchar(256) DEFAULT NULL,
  `extended_response_description` varchar(256) DEFAULT NULL,
  `currency` varchar(256) DEFAULT NULL,
  `amount` varchar(256) DEFAULT NULL,
  `authorization_number` varchar(256) DEFAULT NULL,
  `ticket_number` varchar(256) DEFAULT NULL,
  `response_code` varchar(256) DEFAULT NULL,
  `response_description` varchar(256) DEFAULT NULL,
  `customer_ip` varchar(256) DEFAULT NULL,
  `card_source` varchar(256) DEFAULT NULL,
  `card_country` varchar(256) DEFAULT NULL,
  `version` varchar(256) DEFAULT NULL,
  `risk_index` varchar(255) DEFAULT NULL,
  `RbStatus` varchar(255) DEFAULT NULL,
  `RbKey` varchar(255) DEFAULT NULL,
  `RbLevel` varchar(255) DEFAULT NULL,
  `RbDescription` varchar(255) DEFAULT NULL,
  `verificado` tinyint(1) DEFAULT NULL,
  `VpCodMd5` varchar(32) DEFAULT NULL,
  `medio` enum('vpos','qrcode') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'vpos',
  PRIMARY KEY (`VpCod`),
  UNIQUE KEY `vpos_VpCodMd5_IDX` (`VpCodMd5`) USING BTREE,
  UNIQUE KEY `uq_process_id` (`process_id`),
  KEY `mi_carrito` (`mi_carrito`),
  KEY `ix_vpos__medio` (`medio`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=536434 DEFAULT CHARSET=latin1;