/*
 Navicat Premium Data Transfer

 Source Server         : 0 - LocalHost
 Source Server Type    : MariaDB
 Source Server Version : 100413
 Source Host           : localhost:3306
 Source Schema         : apppokerweb

 Target Server Type    : MariaDB
 Target Server Version : 100413
 File Encoding         : 65001

 Date: 05/07/2023 18:34:20
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for bar
-- ----------------------------
DROP TABLE IF EXISTS `bar`;
CREATE TABLE `bar`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `data_hora_abertura` datetime(0) NULL DEFAULT NULL,
  `data_hora_fechamento` datetime(0) NULL DEFAULT NULL,
  `data_hora_auditoria` datetime(0) NULL DEFAULT NULL,
  `data_abertura` date NULL DEFAULT NULL,
  `hora_abertura` time(0) NULL DEFAULT NULL,
  `id_usuario_abertura` int(11) NULL DEFAULT NULL,
  `data_fechamento` date NULL DEFAULT NULL,
  `hora_fechamento` time(0) NULL DEFAULT NULL,
  `id_usuario_fechamento` int(11) NULL DEFAULT NULL,
  `data_auditoria` date NULL DEFAULT NULL,
  `hora_auditoria` time(0) NULL DEFAULT NULL,
  `id_usuario_auditoria` int(11) NULL DEFAULT NULL,
  `dinheiro` decimal(20, 2) NULL DEFAULT NULL,
  `cartao` decimal(20, 2) NULL DEFAULT NULL,
  `cortesias` decimal(20, 2) NULL DEFAULT NULL,
  `saldo_clientes` decimal(20, 2) NULL DEFAULT NULL,
  `vendas` decimal(20, 2) NULL DEFAULT NULL,
  `custos` decimal(20, 2) NULL DEFAULT NULL,
  `caixa_final` decimal(20, 2) NULL DEFAULT NULL,
  `entrada` decimal(20, 2) NULL DEFAULT NULL,
  `saida` decimal(20, 2) NULL DEFAULT NULL,
  `divergencia` decimal(20, 2) NULL DEFAULT NULL,
  `conferencia_caixa` decimal(20, 2) NULL DEFAULT NULL,
  `obs_fechamento` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `obs_auditoria` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `status` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `data_hora_abertura_index`(`data_hora_abertura`) USING BTREE,
  INDEX `data_hora_fechamento_index`(`data_hora_fechamento`) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for bar_categorias
-- ----------------------------
DROP TABLE IF EXISTS `bar_categorias`;
CREATE TABLE `bar_categorias`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `status` int(11) NULL DEFAULT NULL,
  `excluido` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for bar_comandas
-- ----------------------------
DROP TABLE IF EXISTS `bar_comandas`;
CREATE TABLE `bar_comandas`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_bar` int(11) NULL DEFAULT NULL,
  `data_abertura` date NULL DEFAULT NULL,
  `hora_abertura` time(0) NULL DEFAULT NULL,
  `data_hora_abertura` datetime(0) NULL DEFAULT NULL,
  `id_usuario_abertura` int(11) NULL DEFAULT NULL,
  `id_usuario_fechamento` int(11) NOT NULL,
  `horario_fechamento` datetime(0) NULL DEFAULT NULL,
  `cod_ct` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `cod_ct_ext` int(11) NOT NULL,
  `id_cliente` int(11) NULL DEFAULT NULL,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `total` decimal(20, 2) NULL DEFAULT NULL,
  `dinheiro` decimal(20, 2) NULL DEFAULT NULL,
  `cortesia` decimal(20, 2) NULL DEFAULT NULL,
  `cartao` decimal(20, 2) NULL DEFAULT NULL,
  `saldo` decimal(20, 2) NULL DEFAULT NULL,
  `total_custo` decimal(20, 2) NULL DEFAULT NULL,
  `saldo_congelado` decimal(20, 2) NULL DEFAULT NULL,
  `status` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_bar_index`(`id_bar`) USING BTREE,
  INDEX `id_usuario_abertura_index`(`id_usuario_abertura`) USING BTREE,
  INDEX `id_usuario_fechamento_index`(`id_usuario_fechamento`) USING BTREE,
  INDEX `id_cliente_index`(`id_cliente`) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE,
  FULLTEXT INDEX `cod_ct_index`(`cod_ct`)
) ENGINE = InnoDB AUTO_INCREMENT = 31 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for bar_contagem
-- ----------------------------
DROP TABLE IF EXISTS `bar_contagem`;
CREATE TABLE `bar_contagem`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_bar` int(11) NULL DEFAULT NULL,
  `id_produto` int(11) NULL DEFAULT NULL,
  `inicial` int(11) NULL DEFAULT NULL,
  `final` int(11) NULL DEFAULT NULL,
  `qtd_divergencia` int(11) NULL DEFAULT NULL,
  `valor_divergencia` decimal(20, 2) NULL DEFAULT NULL,
  `status_contagem` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_bar_index`(`id_bar`) USING BTREE,
  INDEX `id_produto_index`(`id_produto`) USING BTREE,
  INDEX `status_contagem_index`(`status_contagem`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for bar_cts_bloq
-- ----------------------------
DROP TABLE IF EXISTS `bar_cts_bloq`;
CREATE TABLE `bar_cts_bloq`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `data` datetime(0) NULL DEFAULT NULL,
  `cod_ct` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `id_cliente` int(11) NULL DEFAULT NULL,
  `id_usuario` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  FULLTEXT INDEX `cod_ct_index`(`cod_ct`)
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for bar_estoque
-- ----------------------------
DROP TABLE IF EXISTS `bar_estoque`;
CREATE TABLE `bar_estoque`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `data` date NULL DEFAULT NULL,
  `id_produto` int(11) NULL DEFAULT NULL,
  `qtd` int(11) NULL DEFAULT NULL,
  `custo` decimal(20, 2) NULL DEFAULT NULL,
  `id_fornecedor` int(11) NULL DEFAULT NULL,
  `tipo` int(11) NULL DEFAULT NULL,
  `observacao` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `usuario` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `data_index`(`data`) USING BTREE,
  INDEX `id_produto_index`(`id_produto`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for bar_pagamentos
-- ----------------------------
DROP TABLE IF EXISTS `bar_pagamentos`;
CREATE TABLE `bar_pagamentos`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_bar` int(11) NOT NULL,
  `id_comanda` int(11) NOT NULL,
  `id_pedido` int(11) NOT NULL,
  `id_jogador` int(11) NOT NULL,
  `id_forma_pgto` int(11) NOT NULL,
  `valor` decimal(20, 2) NOT NULL,
  `valor_taxa` decimal(20, 2) NOT NULL,
  `data_vencimento` datetime(0) NULL DEFAULT NULL,
  `documento` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `emissao_entrada` int(11) NOT NULL,
  `registro_individual` int(11) NOT NULL,
  `id_usuario` int(11) NULL DEFAULT NULL,
  `data_hora` datetime(0) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_bar_index`(`id_bar`) USING BTREE,
  INDEX `id_comanda_index`(`id_comanda`) USING BTREE,
  INDEX `id_pedido_index`(`id_pedido`) USING BTREE,
  INDEX `id_jogador_index`(`id_jogador`) USING BTREE,
  INDEX `id_forma_pgto_index`(`id_forma_pgto`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 25 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for bar_pedidos
-- ----------------------------
DROP TABLE IF EXISTS `bar_pedidos`;
CREATE TABLE `bar_pedidos`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_bar` int(11) NULL DEFAULT NULL,
  `id_comanda` int(11) NULL DEFAULT NULL,
  `entregue` int(11) NOT NULL,
  `id_usuario` int(11) NOT NULL,
  `datahora` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_bar_index`(`id_bar`) USING BTREE,
  INDEX `id_comanda_index`(`id_comanda`) USING BTREE,
  INDEX `entregue_index`(`entregue`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 35 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for bar_produtos
-- ----------------------------
DROP TABLE IF EXISTS `bar_produtos`;
CREATE TABLE `bar_produtos`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `categoria` int(11) NULL DEFAULT NULL,
  `venda` decimal(20, 2) NULL DEFAULT NULL,
  `custo` decimal(20, 2) NULL DEFAULT NULL,
  `data_cadastro` date NULL DEFAULT NULL,
  `cod_barras` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `id_usuario_cadastro` int(11) NULL DEFAULT NULL,
  `status_contagem` int(11) NULL DEFAULT NULL,
  `promo` int(11) NOT NULL,
  `promo_status` int(11) NOT NULL,
  `estoque_med` int(11) NOT NULL,
  `estoque_min` int(11) NOT NULL,
  `status` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `categoria_index`(`categoria`) USING BTREE,
  INDEX `status_contagem_index`(`status_contagem`) USING BTREE,
  INDEX `promo_index`(`promo`) USING BTREE,
  INDEX `promo_status_index`(`promo_status`) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for bar_promocoes
-- ----------------------------
DROP TABLE IF EXISTS `bar_promocoes`;
CREATE TABLE `bar_promocoes`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_prod_promo` int(11) NULL DEFAULT NULL,
  `id_produto` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_prod_promo_index`(`id_prod_promo`) USING BTREE,
  INDEX `id_produto_index`(`id_produto`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for bar_valores_caixa
-- ----------------------------
DROP TABLE IF EXISTS `bar_valores_caixa`;
CREATE TABLE `bar_valores_caixa`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_bar` int(11) NOT NULL,
  `id_forma_pgto` int(11) NOT NULL,
  `valor` decimal(20, 2) NOT NULL,
  `data_hora` datetime(0) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_bar_index`(`id_bar`) USING BTREE,
  INDEX `id_forma_pgto_index`(`id_forma_pgto`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for bar_vendas
-- ----------------------------
DROP TABLE IF EXISTS `bar_vendas`;
CREATE TABLE `bar_vendas`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_bar` int(11) NULL DEFAULT NULL,
  `id_jogador` int(11) NULL DEFAULT NULL,
  `id_pedido` int(11) NULL DEFAULT NULL,
  `id_comanda` int(11) NULL DEFAULT NULL,
  `id_produto` int(11) NULL DEFAULT NULL,
  `qtd_produto` int(11) NULL DEFAULT NULL,
  `venda_produto` decimal(20, 2) NULL DEFAULT NULL,
  `custo_produto` decimal(20, 2) NULL DEFAULT NULL,
  `entregue` int(11) NOT NULL,
  `promo` int(11) NOT NULL,
  `promo_id` int(11) NULL DEFAULT NULL,
  `id_usuario` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_bar_index`(`id_bar`) USING BTREE,
  INDEX `id_jogador_index`(`id_jogador`) USING BTREE,
  INDEX `id_pedido_index`(`id_pedido`) USING BTREE,
  INDEX `id_comanda_index`(`id_comanda`) USING BTREE,
  INDEX `id_produto_index`(`id_produto`) USING BTREE,
  INDEX `entregue_index`(`entregue`) USING BTREE,
  INDEX `promo_index`(`promo`) USING BTREE,
  INDEX `id_usuario_index`(`id_usuario`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 45 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for cash
-- ----------------------------
DROP TABLE IF EXISTS `cash`;
CREATE TABLE `cash`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `data_hora_abertura` datetime(0) NULL DEFAULT NULL,
  `data_hora_fechamento` datetime(0) NULL DEFAULT NULL,
  `data_hora_auditoria` datetime(0) NULL DEFAULT NULL,
  `data_abertura` date NULL DEFAULT NULL,
  `hora_abertura` time(0) NULL DEFAULT NULL,
  `id_usuario_abertura` int(11) NULL DEFAULT NULL,
  `data_fechamento` date NULL DEFAULT NULL,
  `hora_fechamento` time(0) NULL DEFAULT NULL,
  `id_usuario_fechamento` int(11) NULL DEFAULT NULL,
  `data_auditoria` date NULL DEFAULT NULL,
  `hora_auditoria` time(0) NULL DEFAULT NULL,
  `id_usuario_auditoria` int(11) NULL DEFAULT NULL,
  `dinheiro` decimal(20, 2) NULL DEFAULT NULL,
  `cartao` decimal(20, 2) NULL DEFAULT NULL,
  `cartao_cred` decimal(20, 2) NOT NULL,
  `cartao_taxa_deb` decimal(20, 2) NOT NULL,
  `cartao_taxa_cred` decimal(20, 2) NULL DEFAULT NULL,
  `cheque` decimal(20, 2) NOT NULL,
  `cortesias` decimal(20, 2) NULL DEFAULT NULL,
  `caixa_final` decimal(20, 2) NULL DEFAULT NULL,
  `rake` decimal(20, 2) NULL DEFAULT NULL,
  `compras` int(11) NULL DEFAULT NULL,
  `devolucoes` int(11) NULL DEFAULT NULL,
  `fichas_fora` int(11) NOT NULL,
  `jackpot` int(11) NULL DEFAULT NULL,
  `pothora` int(11) NULL DEFAULT NULL,
  `gorjetas` int(11) NULL DEFAULT NULL,
  `outras_devolucoes` int(11) NULL DEFAULT NULL,
  `saldo_clientes` decimal(20, 2) NULL DEFAULT NULL,
  `saida` decimal(20, 2) NULL DEFAULT NULL,
  `entrada` decimal(20, 2) NULL DEFAULT NULL,
  `conferencia_caixa` decimal(20, 2) NULL DEFAULT NULL,
  `gaveta_ini` int(11) NOT NULL,
  `gaveta` int(11) NULL DEFAULT NULL,
  `chipcount` int(11) NULL DEFAULT NULL,
  `dinheiro_conferencia` decimal(20, 2) NULL DEFAULT NULL,
  `cartao_conferencia` decimal(20, 2) NULL DEFAULT NULL,
  `cartao_cred_conferencia` decimal(20, 2) NULL DEFAULT NULL,
  `cheque_conferencia` decimal(20, 2) NULL DEFAULT NULL,
  `sangeurs` int(11) NOT NULL,
  `espelho` int(11) NOT NULL,
  `obs_fechamento` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `obs_auditoria` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `id_continuo` int(11) NOT NULL,
  `liberado` int(11) NULL DEFAULT NULL,
  `status` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `data_hora_abertura_index`(`data_hora_abertura`) USING BTREE,
  INDEX `data_hora_fechamento_index`(`data_hora_fechamento`) USING BTREE,
  INDEX `liberado_index`(`liberado`) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 26 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for cash_fichas
-- ----------------------------
DROP TABLE IF EXISTS `cash_fichas`;
CREATE TABLE `cash_fichas`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_cash` int(11) NULL DEFAULT NULL,
  `qtd` int(11) NOT NULL,
  `valor` decimal(10, 2) NULL DEFAULT NULL,
  `sub_total` decimal(10, 2) NULL DEFAULT NULL,
  `conferencia` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `unique_id`(`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_cash_index`(`id_cash`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for cash_fichas_gaveta
-- ----------------------------
DROP TABLE IF EXISTS `cash_fichas_gaveta`;
CREATE TABLE `cash_fichas_gaveta`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_cash` int(11) NOT NULL,
  `valor` decimal(20, 2) NOT NULL,
  `qtd_ini` int(11) NOT NULL,
  `qtd_extra` int(11) NOT NULL,
  `qtd_cash` int(11) NOT NULL,
  `cor` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `unique_id`(`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_cash_index`(`id_cash`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 28 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for cash_fichas_saldo
-- ----------------------------
DROP TABLE IF EXISTS `cash_fichas_saldo`;
CREATE TABLE `cash_fichas_saldo`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_jogador` int(11) NULL DEFAULT NULL,
  `id_cash` int(11) NULL DEFAULT NULL,
  `id_venda` int(11) NULL DEFAULT NULL,
  `fichas` int(11) NULL DEFAULT NULL,
  `descricao` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `id_usuario` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `id_jogador`(`id_jogador`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 31 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for cash_gorjetas
-- ----------------------------
DROP TABLE IF EXISTS `cash_gorjetas`;
CREATE TABLE `cash_gorjetas`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_cash` int(11) NULL DEFAULT NULL,
  `id_usuario` int(11) NULL DEFAULT NULL,
  `id_funcionario` int(11) NOT NULL,
  `valor_original` int(11) NOT NULL,
  `valor` int(11) NULL DEFAULT NULL,
  `hora` time(0) NULL DEFAULT NULL,
  `pago` int(11) NULL DEFAULT NULL,
  `id_forma_pgto` int(11) NOT NULL,
  `id_mesa` int(11) NOT NULL,
  `id_centro` int(11) NOT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_cash_index`(`id_cash`) USING BTREE,
  INDEX `id_funcionario_index`(`id_funcionario`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 31 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for cash_gorjetas_centros
-- ----------------------------
DROP TABLE IF EXISTS `cash_gorjetas_centros`;
CREATE TABLE `cash_gorjetas_centros`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `descricao` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `capagem` decimal(20, 2) NOT NULL,
  `status` int(11) NOT NULL,
  `excluido` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for cash_historico
-- ----------------------------
DROP TABLE IF EXISTS `cash_historico`;
CREATE TABLE `cash_historico`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_cash` int(11) NULL DEFAULT NULL,
  `opcao_id` int(11) NULL DEFAULT NULL,
  `valores` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `opcao_id_extra` int(11) NULL DEFAULT NULL,
  `valores_extras` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `historico_id_ref` int(11) NULL DEFAULT NULL,
  `horario` time(0) NULL DEFAULT NULL,
  `registro` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `descricao` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `usuario` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `mostrar` int(11) NULL DEFAULT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `format_json` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_cash_index`(`id_cash`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 905 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for cash_historico_opcoes
-- ----------------------------
DROP TABLE IF EXISTS `cash_historico_opcoes`;
CREATE TABLE `cash_historico_opcoes`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `registro` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `descricao` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 59 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for cash_mesas
-- ----------------------------
DROP TABLE IF EXISTS `cash_mesas`;
CREATE TABLE `cash_mesas`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_cash` int(11) NULL DEFAULT NULL,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cor` int(2) NOT NULL,
  `id_modalidade` int(11) NOT NULL,
  `data_hora_abertura` datetime(0) NULL DEFAULT NULL,
  `data_hora_fechamento` datetime(0) NULL DEFAULT NULL,
  `id_usuario_abertura` int(11) NOT NULL,
  `id_usuario_fechamento` int(11) NOT NULL,
  `hora_total` int(11) NOT NULL,
  `excluido` int(11) NOT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_cash_index`(`id_cash`) USING BTREE,
  INDEX `id_modalidade_index`(`id_modalidade`) USING BTREE,
  INDEX `data_hora_abertura_index`(`data_hora_abertura`) USING BTREE,
  INDEX `excluido_index`(`excluido`) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 18 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for cash_modalidades
-- ----------------------------
DROP TABLE IF EXISTS `cash_modalidades`;
CREATE TABLE `cash_modalidades`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `observacao` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `id_usuario` int(11) NOT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `excluido` int(11) NOT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `excluido_index`(`excluido`) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for cash_pacotes_vendas
-- ----------------------------
DROP TABLE IF EXISTS `cash_pacotes_vendas`;
CREATE TABLE `cash_pacotes_vendas`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `fichas` int(11) NULL DEFAULT NULL,
  `valor` decimal(20, 4) NULL DEFAULT NULL,
  `status` int(11) NOT NULL,
  `excluido` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for cash_pagamentos
-- ----------------------------
DROP TABLE IF EXISTS `cash_pagamentos`;
CREATE TABLE `cash_pagamentos`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_cash` int(11) NOT NULL,
  `id_registro` int(11) NOT NULL,
  `id_venda` int(11) NOT NULL,
  `id_jogador` int(11) NOT NULL,
  `id_forma_pgto` int(11) NOT NULL,
  `valor` decimal(20, 2) NOT NULL,
  `valor_taxa` decimal(20, 2) NOT NULL,
  `data_vencimento` datetime(0) NULL DEFAULT NULL,
  `documento` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `emissao_entrada` int(11) NOT NULL,
  `registro_individual` int(11) NOT NULL,
  `id_mesa` int(11) NOT NULL,
  `id_sangeur` int(11) NOT NULL,
  `id_usuario` int(11) NULL DEFAULT NULL,
  `data_hora` datetime(0) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_cash_index`(`id_cash`) USING BTREE,
  INDEX `id_registro_index`(`id_registro`) USING BTREE,
  INDEX `id_venda_index`(`id_venda`) USING BTREE,
  INDEX `id_jogador_index`(`id_jogador`) USING BTREE,
  INDEX `id_forma_pgto_index`(`id_forma_pgto`) USING BTREE,
  INDEX `id_mesa_index`(`id_mesa`) USING BTREE,
  INDEX `id_sangeur_index`(`id_sangeur`) USING BTREE,
  INDEX `id_usuario_index`(`id_usuario`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 266 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for cash_pothora
-- ----------------------------
DROP TABLE IF EXISTS `cash_pothora`;
CREATE TABLE `cash_pothora`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_cash` int(11) NULL DEFAULT NULL,
  `id_usuario` int(11) NULL DEFAULT NULL,
  `id_funcionario` int(11) NOT NULL,
  `valor` int(11) NULL DEFAULT NULL,
  `hora` time(0) NULL DEFAULT NULL,
  `id_mesa` int(11) NOT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_cash_index`(`id_cash`) USING BTREE,
  INDEX `id_usuario_index`(`id_usuario`) USING BTREE,
  INDEX `id_funcionario_index`(`id_funcionario`) USING BTREE,
  INDEX `id_mesa_index`(`id_mesa`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for cash_rake
-- ----------------------------
DROP TABLE IF EXISTS `cash_rake`;
CREATE TABLE `cash_rake`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_cash` int(11) NULL DEFAULT NULL,
  `id_usuario` int(11) NULL DEFAULT NULL,
  `id_dealer` int(11) NOT NULL,
  `usuario` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `valor` int(11) NULL DEFAULT NULL,
  `hora` time(0) NULL DEFAULT NULL,
  `id_mesa` int(11) NOT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_cash_index`(`id_cash`) USING BTREE,
  INDEX `id_usuario_index`(`id_usuario`) USING BTREE,
  INDEX `id_dealer_index`(`id_dealer`) USING BTREE,
  INDEX `id_mesa_index`(`id_mesa`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 29 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for cash_registros
-- ----------------------------
DROP TABLE IF EXISTS `cash_registros`;
CREATE TABLE `cash_registros`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_cash` int(11) NULL DEFAULT NULL,
  `id_jogador` int(11) NULL DEFAULT NULL,
  `nome_cliente` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `mesa` int(11) NULL DEFAULT NULL,
  `hora_entrada` time(0) NULL DEFAULT NULL,
  `dinheiro` decimal(20, 2) NULL DEFAULT NULL,
  `cartao` decimal(20, 2) NULL DEFAULT NULL,
  `cartao_cred` decimal(20, 2) NOT NULL,
  `cartao_taxa_deb` decimal(20, 2) NOT NULL,
  `cartao_taxa_cred` decimal(20, 2) NOT NULL,
  `cheque` decimal(20, 2) NOT NULL,
  `cortesia` decimal(20, 2) NULL DEFAULT NULL,
  `dinheiro_retirada` decimal(20, 2) NULL DEFAULT NULL,
  `cartao_retirada` decimal(20, 2) NULL DEFAULT NULL,
  `cartao_cred_retirada` decimal(20, 2) NOT NULL,
  `cheque_retirada` decimal(20, 2) NOT NULL,
  `cortesia_retirada` decimal(20, 2) NULL DEFAULT NULL,
  `total_debito` decimal(20, 2) NULL DEFAULT NULL,
  `total_credito` decimal(20, 2) NULL DEFAULT NULL,
  `total` decimal(20, 2) NULL DEFAULT NULL,
  `jogador_casa` int(11) NULL DEFAULT NULL,
  `observacao` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `saldo_congelado` decimal(20, 2) NULL DEFAULT NULL,
  `status` int(11) NULL DEFAULT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_cash_index`(`id_cash`) USING BTREE,
  INDEX `id_jogador_index`(`id_jogador`) USING BTREE,
  INDEX `mesa_index`(`mesa`) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 81 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for cash_registros_fichas
-- ----------------------------
DROP TABLE IF EXISTS `cash_registros_fichas`;
CREATE TABLE `cash_registros_fichas`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_cash` int(11) NULL DEFAULT NULL,
  `id_jogador` int(11) NULL DEFAULT NULL,
  `id_registro` int(11) NULL DEFAULT NULL,
  `id_historico` int(11) NULL DEFAULT NULL,
  `hora` time(0) NULL DEFAULT NULL,
  `data` date NULL DEFAULT NULL,
  `compra` int(11) NOT NULL,
  `devolucao` int(11) NOT NULL,
  `valor` decimal(20, 4) NULL DEFAULT NULL,
  `dinheiro` decimal(20, 2) NULL DEFAULT NULL,
  `cartao` decimal(20, 2) NULL DEFAULT NULL,
  `cartao_cred` decimal(20, 2) NOT NULL,
  `cartao_taxa_deb` decimal(20, 2) NOT NULL,
  `cartao_taxa_cred` decimal(20, 2) NOT NULL,
  `cheque` decimal(20, 2) NOT NULL,
  `cortesia` decimal(20, 2) NULL DEFAULT NULL,
  `usuario` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `id_usuario` int(11) NULL DEFAULT NULL,
  `tipo` int(11) NULL DEFAULT NULL,
  `id_mesa` int(11) NOT NULL,
  `id_sangeur` int(11) NOT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_cash_index`(`id_cash`) USING BTREE,
  INDEX `id_jogador_index`(`id_jogador`) USING BTREE,
  INDEX `id_registro_index`(`id_registro`) USING BTREE,
  INDEX `id_historico_index`(`id_historico`) USING BTREE,
  INDEX `tipo_index`(`tipo`) USING BTREE,
  INDEX `id_mesa_index`(`id_mesa`) USING BTREE,
  INDEX `id_sangeur_index`(`id_sangeur`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 272 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for cash_registros_horarios
-- ----------------------------
DROP TABLE IF EXISTS `cash_registros_horarios`;
CREATE TABLE `cash_registros_horarios`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_cash` int(11) NULL DEFAULT NULL,
  `id_jogador` int(11) NULL DEFAULT NULL,
  `id_registro` int(11) NULL DEFAULT NULL,
  `entrada` time(0) NULL DEFAULT NULL,
  `saida` time(0) NULL DEFAULT NULL,
  `reg_entrada` datetime(0) NULL DEFAULT NULL,
  `reg_saida` datetime(0) NULL DEFAULT NULL,
  `hora_total` int(20) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_cash_index`(`id_cash`) USING BTREE,
  INDEX `id_jogador_index`(`id_jogador`) USING BTREE,
  INDEX `id_registro_index`(`id_registro`) USING BTREE,
  INDEX `reg_entrada_index`(`reg_entrada`) USING BTREE,
  INDEX `reg_saida_index`(`reg_saida`) USING BTREE,
  INDEX `hora_total_index`(`hora_total`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 91 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for cash_registros_reservas
-- ----------------------------
DROP TABLE IF EXISTS `cash_registros_reservas`;
CREATE TABLE `cash_registros_reservas`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_cash` int(11) NULL DEFAULT NULL,
  `id_jogador` int(11) NULL DEFAULT NULL,
  `nome_jogador` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `hora` time(0) NULL DEFAULT NULL,
  `id_mesa` int(11) NOT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_cash_index`(`id_cash`) USING BTREE,
  INDEX `id_jogador_index`(`id_jogador`) USING BTREE,
  INDEX `id_mesa_index`(`id_mesa`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for cash_retornos
-- ----------------------------
DROP TABLE IF EXISTS `cash_retornos`;
CREATE TABLE `cash_retornos`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_cash` int(11) NOT NULL,
  `valor` int(11) NOT NULL,
  `obs` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `id_pgto` int(11) NOT NULL,
  `id_usuario` int(11) NOT NULL,
  `data_hora` datetime(0) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_cash_index`(`id_cash`) USING BTREE,
  INDEX `id_pgto_index`(`id_pgto`) USING BTREE,
  INDEX `id_usuario_index`(`id_usuario`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for cash_sangeurs
-- ----------------------------
DROP TABLE IF EXISTS `cash_sangeurs`;
CREATE TABLE `cash_sangeurs`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_cash` int(11) NULL DEFAULT NULL,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `data_hora_abertura` datetime(0) NULL DEFAULT NULL,
  `data_hora_fechamento` datetime(0) NULL DEFAULT NULL,
  `id_usuario_abertura` int(11) NOT NULL,
  `id_usuario_fechamento` int(11) NOT NULL,
  `hora_total` int(11) NOT NULL,
  `id_usuario_vinculo` int(11) NOT NULL,
  `impressora` int(11) NOT NULL,
  `excluido` int(11) NOT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_cash_index`(`id_cash`) USING BTREE,
  INDEX `excluido_index`(`excluido`) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 16 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for cash_transferencias
-- ----------------------------
DROP TABLE IF EXISTS `cash_transferencias`;
CREATE TABLE `cash_transferencias`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_cash` int(11) NULL DEFAULT NULL,
  `id_registro` int(11) NULL DEFAULT NULL,
  `id_venda` int(11) NULL DEFAULT NULL,
  `id_jogador` int(11) NULL DEFAULT NULL,
  `destino_id_jogador` int(11) NULL DEFAULT NULL,
  `destino_id_venda` int(11) NULL DEFAULT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_cash_index`(`id_cash`) USING BTREE,
  INDEX `id_registro_index`(`id_registro`) USING BTREE,
  INDEX `id_venda_index`(`id_venda`) USING BTREE,
  INDEX `id_jogador_index`(`id_jogador`) USING BTREE,
  INDEX `destino_id_jogador_index`(`destino_id_jogador`) USING BTREE,
  INDEX `destino_id_venda_index`(`destino_id_venda`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 47 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for cash_valores_caixa
-- ----------------------------
DROP TABLE IF EXISTS `cash_valores_caixa`;
CREATE TABLE `cash_valores_caixa`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_cash` int(11) NOT NULL,
  `id_forma_pgto` int(11) NOT NULL,
  `valor` decimal(20, 2) NOT NULL,
  `data_hora` datetime(0) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_cash_index`(`id_cash`) USING BTREE,
  INDEX `id_forma_pgto_index`(`id_forma_pgto`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 191 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clientes
-- ----------------------------
DROP TABLE IF EXISTS `clientes`;
CREATE TABLE `clientes`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nome` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `gameid` int(11) NULL DEFAULT NULL,
  `cod_clube` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `nick` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `nick_ativo` int(11) NOT NULL,
  `foto` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `endereco` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cidade` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `uf` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `pais` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `pais_id` int(11) NULL DEFAULT NULL,
  `celular` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `telefone` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `nascimento` date NULL DEFAULT NULL,
  `doc_pais_id` int(11) NULL DEFAULT NULL,
  `doc_tipo_id` int(11) NULL DEFAULT NULL,
  `doc_numero` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cpf` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `rg` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `outro_doc_id` int(11) NOT NULL,
  `outro_doc` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `email` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `sexo` int(11) NULL DEFAULT NULL,
  `estrangeiro` int(11) NOT NULL,
  `id_ttd` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `observacao` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `credito` int(11) NULL DEFAULT NULL,
  `limite` decimal(12, 2) NULL DEFAULT NULL,
  `limite_cash` decimal(12, 2) NULL DEFAULT NULL,
  `limite_torneio` decimal(12, 2) NULL DEFAULT NULL,
  `limite_bar` decimal(12, 2) NULL DEFAULT NULL,
  `data_cadastro` datetime(0) NULL DEFAULT NULL,
  `data_liberacao_inadimplencia` datetime(0) NULL DEFAULT NULL,
  `id_usuario` int(11) NULL DEFAULT NULL,
  `funcionario` int(11) NOT NULL,
  `pix` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `banco` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `banco_agencia` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `banco_conta` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `banco_obs` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `id_grupo` int(11) NOT NULL,
  `id_alerta` int(11) NOT NULL,
  `id_alerta_trn` int(11) NOT NULL,
  `id_alerta_cash` int(11) NOT NULL,
  `id_alerta_bar` int(11) NOT NULL,
  `grupo1` int(11) NOT NULL,
  `grupo2` int(11) NOT NULL,
  `indicacao_id` int(11) NULL DEFAULT NULL,
  `indicacao_detalhes` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `co_id_app` int(20) NULL DEFAULT NULL,
  `co_id_agente` int(20) NULL DEFAULT NULL,
  `rewards_cad` int(11) NOT NULL,
  `excluido` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `nome_index`(`nome`(10)) USING BTREE,
  INDEX `cpf_index`(`cpf`(10)) USING BTREE,
  INDEX `rg_index`(`rg`(10)) USING BTREE,
  INDEX `outro_doc_index`(`outro_doc`(10)) USING BTREE,
  INDEX `sexo_index`(`sexo`) USING BTREE,
  INDEX `estrangeiro_index`(`estrangeiro`) USING BTREE,
  INDEX `data_cadastro_index`(`data_cadastro`) USING BTREE,
  INDEX `funcionario_index`(`funcionario`) USING BTREE,
  INDEX `id_grupo_index`(`id_grupo`) USING BTREE,
  INDEX `excluido_index`(`excluido`) USING BTREE,
  FULLTEXT INDEX `cod_clube_index`(`cod_clube`)
) ENGINE = InnoDB AUTO_INCREMENT = 331 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clientes_ag_bancarios
-- ----------------------------
DROP TABLE IF EXISTS `clientes_ag_bancarios`;
CREATE TABLE `clientes_ag_bancarios`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `horario` datetime(0) NULL DEFAULT NULL,
  `id_lancamento` int(11) NULL DEFAULT NULL,
  `id_jogador` int(11) NULL DEFAULT NULL,
  `valor` decimal(20, 2) NULL DEFAULT NULL,
  `id_usuario` int(11) NULL DEFAULT NULL,
  `pix` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `banco_agencia` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `banco` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `banco_conta` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `banco_obs` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `realizado` int(11) NOT NULL,
  `realizado_data_hora` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_lancamento_index`(`id_lancamento`) USING BTREE,
  INDEX `id_jogador_index`(`id_jogador`) USING BTREE,
  INDEX `id_usuario_index`(`id_usuario`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clientes_alertas
-- ----------------------------
DROP TABLE IF EXISTS `clientes_alertas`;
CREATE TABLE `clientes_alertas`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `titulo` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `mensagem` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cor` int(11) NOT NULL,
  `modulo` int(11) NOT NULL,
  `caixa_bloq` int(11) NOT NULL,
  `emails_enviar` int(11) NOT NULL,
  `emails` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 19 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clientes_grupos
-- ----------------------------
DROP TABLE IF EXISTS `clientes_grupos`;
CREATE TABLE `clientes_grupos`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `descricao` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `alerta_padrao` int(11) NOT NULL,
  `alerta_inadimplencia` int(11) NOT NULL,
  `frequencia` int(11) NOT NULL,
  `data1` int(11) NOT NULL,
  `data2` int(11) NOT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clientes_indicacao_tags
-- ----------------------------
DROP TABLE IF EXISTS `clientes_indicacao_tags`;
CREATE TABLE `clientes_indicacao_tags`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `titulo` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `detalhes` int(11) NOT NULL,
  `excluido` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_cliente_index`(`id`) USING BTREE,
  INDEX `data_saldo_index`(`detalhes`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clientes_notas
-- ----------------------------
DROP TABLE IF EXISTS `clientes_notas`;
CREATE TABLE `clientes_notas`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_pai` int(11) NOT NULL,
  `id_cliente` int(11) NOT NULL,
  `mensagem` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `anexo` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `usuario_id` int(11) NOT NULL,
  `data_hora` datetime(0) NOT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clientes_registros
-- ----------------------------
DROP TABLE IF EXISTS `clientes_registros`;
CREATE TABLE `clientes_registros`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_cliente` int(11) NULL DEFAULT NULL,
  `id_usuario` int(11) NULL DEFAULT NULL,
  `data` date NULL DEFAULT NULL,
  `registro` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `valor` decimal(20, 2) NULL DEFAULT NULL,
  `tipo_relatorio` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `id_relatorio` int(11) NULL DEFAULT NULL,
  `id_venda` int(11) NULL DEFAULT NULL,
  `observacao` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `alteracao` int(11) NULL DEFAULT NULL,
  `id_evento_caixa` int(11) NOT NULL,
  `id_evento` int(11) NOT NULL,
  `id_periodo` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_cliente_index`(`id_cliente`) USING BTREE,
  INDEX `data_index`(`data`) USING BTREE,
  INDEX `tipo_relatorio_index`(`tipo_relatorio`(10)) USING BTREE,
  INDEX `id_relatorio_index`(`id_relatorio`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 47 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clientes_registros_alteracoes
-- ----------------------------
DROP TABLE IF EXISTS `clientes_registros_alteracoes`;
CREATE TABLE `clientes_registros_alteracoes`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_cliente` int(11) NULL DEFAULT NULL,
  `id_registro` int(11) NULL DEFAULT NULL,
  `id_usuario` int(11) NULL DEFAULT NULL,
  `data` date NULL DEFAULT NULL,
  `de` decimal(20, 2) NULL DEFAULT NULL,
  `para` decimal(20, 2) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_cliente_index`(`id_cliente`) USING BTREE,
  INDEX `id_registro_index`(`id_registro`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clientes_saldos
-- ----------------------------
DROP TABLE IF EXISTS `clientes_saldos`;
CREATE TABLE `clientes_saldos`  (
  `id_cliente` int(11) NOT NULL AUTO_INCREMENT,
  `saldo_congelado` decimal(20, 2) NULL DEFAULT NULL,
  `data_saldo` datetime(0) NULL DEFAULT NULL,
  `data_quitacao` datetime(0) NULL DEFAULT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`id_cliente`) USING BTREE,
  UNIQUE INDEX `id_cliente_index`(`id_cliente`) USING BTREE,
  INDEX `data_saldo_index`(`data_saldo`) USING BTREE,
  INDEX `data_quitacao_index`(`data_quitacao`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 258 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_agentes
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_agentes`;
CREATE TABLE `clubesonline_agentes`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `foto` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `endereco` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cidade` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `uf` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `pais` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `celular` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `telefone` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `nascimento` date NULL DEFAULT NULL,
  `cpf` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `rg` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `outro_doc` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `email` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `observacao` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `percent_rake` decimal(12, 2) NULL DEFAULT NULL,
  `limite` decimal(12, 2) NULL DEFAULT NULL,
  `data_cadastro` datetime(0) NULL DEFAULT NULL,
  `id_usuario` int(11) NULL DEFAULT NULL,
  `banco` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `banco_agencia` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `banco_conta` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `banco_obs` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `id_usuario_cadastro` int(11) NULL DEFAULT NULL,
  `id_app` int(20) NULL DEFAULT NULL,
  `id_clube_app` int(20) NULL DEFAULT NULL,
  `slot_ignorar` int(11) NOT NULL,
  `fechamento_tipo` int(11) NOT NULL,
  `login` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `senha` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `codigo` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `lang_layout` int(11) NULL DEFAULT NULL,
  `id_clube` int(11) NULL DEFAULT NULL,
  `ativo` int(11) NOT NULL,
  `excluido` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `nome_index`(`nome`(10)) USING BTREE,
  INDEX `cpf_index`(`cpf`(10)) USING BTREE,
  INDEX `rg_index`(`rg`(10)) USING BTREE,
  INDEX `outro_doc_index`(`outro_doc`(10)) USING BTREE,
  INDEX `data_cadastro_index`(`data_cadastro`) USING BTREE,
  INDEX `excluido_index`(`excluido`) USING BTREE,
  INDEX `ativo_index`(`ativo`) USING BTREE,
  INDEX `co_ativo_index`(`ativo`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 196 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_agentes_infs
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_agentes_infs`;
CREATE TABLE `clubesonline_agentes_infs`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_app` int(20) NULL DEFAULT NULL,
  `liga_id` int(20) NULL DEFAULT NULL,
  `arquivo_id` int(20) NULL DEFAULT NULL,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `ganhos` decimal(30, 2) NULL DEFAULT NULL,
  `rake` decimal(30, 2) NULL DEFAULT NULL,
  `maos` decimal(30, 2) NULL DEFAULT NULL,
  `data_arquivo` datetime(0) NULL DEFAULT NULL,
  `data_inicio` datetime(0) NULL DEFAULT NULL,
  `data_fim` datetime(0) NULL DEFAULT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_avisos
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_avisos`;
CREATE TABLE `clubesonline_avisos`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `titulo` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `conteudo` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `id_usuario` int(11) NOT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_avisos_emails
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_avisos_emails`;
CREATE TABLE `clubesonline_avisos_emails`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_aviso` int(11) NOT NULL,
  `id_clube` int(11) NOT NULL,
  `email` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_clubes
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_clubes`;
CREATE TABLE `clubesonline_clubes`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `logo` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `endereco` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cidade` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `uf` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `pais` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `celular` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `telefone` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `contato` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `contato_cel` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `contato_cpf` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `contato_rg` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `contato_outro_doc` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `email` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `observacao` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `config_percentual_overlay` decimal(20, 2) NOT NULL,
  `data_cadastro` datetime(0) NULL DEFAULT NULL,
  `id_usuario` int(11) NULL DEFAULT NULL,
  `banco` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `banco_agencia` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `banco_conta` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `banco_obs` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `taxa_liga` decimal(20, 2) NOT NULL,
  `excluido` int(11) NOT NULL,
  `id_app` int(20) NULL DEFAULT NULL,
  `sistema_vinculado` int(11) NOT NULL,
  `vinculo_cod` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `vinculo_bloqueio` int(11) NOT NULL,
  `mult_liga_cod` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `fechamento_formato` int(11) NOT NULL,
  `fechamento_calculo_fichas_enviadas` int(11) NOT NULL,
  `fechamento_taxas_admin_disabled` int(11) NOT NULL,
  `overlay_percent_meta` decimal(20, 2) NULL DEFAULT NULL,
  `overlay_divisao` int(11) NOT NULL,
  `overlay_mesclar_clube_id` int(11) NULL DEFAULT NULL,
  `seguro_percent` decimal(20, 2) NOT NULL,
  `diamantes_cotacao` decimal(20, 6) NOT NULL,
  `diamantes_cotacao_on` int(11) NOT NULL,
  `lang_layout` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `nome_index`(`nome`(10)) USING BTREE,
  INDEX `cpf_index`(`contato_cpf`(10)) USING BTREE,
  INDEX `rg_index`(`contato_rg`(10)) USING BTREE,
  INDEX `outro_doc_index`(`contato_outro_doc`(10)) USING BTREE,
  INDEX `data_cadastro_index`(`data_cadastro`) USING BTREE,
  INDEX `excluido_index`(`excluido`) USING BTREE,
  INDEX `clubesonline_clubes_sistema_vinculado_index`(`sistema_vinculado`) USING BTREE,
  INDEX `clubesonline_clubes_id_app_index`(`id_app`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 71 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_clubes_acertos
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_clubes_acertos`;
CREATE TABLE `clubesonline_clubes_acertos`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_fechamento` int(11) NULL DEFAULT NULL,
  `id_clube_origem` int(11) NULL DEFAULT NULL,
  `id_clube_destino` int(11) NULL DEFAULT NULL,
  `valor` decimal(20, 2) NOT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_clubes_filhos
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_clubes_filhos`;
CREATE TABLE `clubesonline_clubes_filhos`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `clube_id_pai` int(11) NULL DEFAULT NULL,
  `clube_id_filho` int(11) NULL DEFAULT NULL,
  `clube_id_app_filho` int(11) NULL DEFAULT NULL,
  `percent` decimal(30, 4) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_clubes_filhos_valores
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_clubes_filhos_valores`;
CREATE TABLE `clubesonline_clubes_filhos_valores`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_fechamento` int(11) NULL DEFAULT NULL,
  `id_fechamento_clube` int(11) NULL DEFAULT NULL,
  `id_fechamento_filho` int(11) NULL DEFAULT NULL,
  `valor` decimal(30, 4) NOT NULL,
  `percent` decimal(30, 4) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_fechamento_index`(`id_fechamento`) USING BTREE,
  INDEX `id_fechamento_clube_index`(`id_fechamento_clube`) USING BTREE,
  INDEX `id_fechamento_filho_index`(`id_fechamento_filho`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_clubes_ids
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_clubes_ids`;
CREATE TABLE `clubesonline_clubes_ids`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_clube` int(11) NULL DEFAULT NULL,
  `app_id` int(20) NULL DEFAULT NULL,
  `id_principal` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 351 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_clubes_solicitacoes
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_clubes_solicitacoes`;
CREATE TABLE `clubesonline_clubes_solicitacoes`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_clube` int(11) NOT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `valor` decimal(20, 4) NOT NULL,
  `concluido_data_hora` datetime(0) NULL DEFAULT NULL,
  `andamento_usuario` int(11) NOT NULL,
  `concluido_valor` decimal(20, 4) NOT NULL,
  `concluido_usuario` int(11) NOT NULL,
  `obs` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `obs_json` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `nome_index`(`id_clube`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_diamantes
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_diamantes`;
CREATE TABLE `clubesonline_diamantes`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tipo` int(11) NULL DEFAULT NULL,
  `quantidade` decimal(30, 2) NULL DEFAULT NULL,
  `id_clube` int(11) NULL DEFAULT NULL,
  `id_clube_app` int(20) NULL DEFAULT NULL,
  `agente_id_app` int(20) NULL DEFAULT NULL,
  `agente_nick` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `jogador_id_app` int(20) NULL DEFAULT NULL,
  `jogador_nick` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `diamante_opcao` int(11) NULL DEFAULT NULL,
  `nivel_duracao` int(11) NULL DEFAULT NULL,
  `observacao` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `data_lancamento` date NULL DEFAULT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `id_usuario` int(11) NULL DEFAULT NULL,
  `id_fechamento` int(11) NULL DEFAULT NULL,
  `id_categoria` int(11) NULL DEFAULT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_diamantes_opcoes
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_diamantes_opcoes`;
CREATE TABLE `clubesonline_diamantes_opcoes`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `grupo` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `diamantes` decimal(30, 2) NOT NULL,
  `titulo` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `descricao` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `excluido` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `excluido_index`(`excluido`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_fechamentos
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_fechamentos`;
CREATE TABLE `clubesonline_fechamentos`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `data_inicio` datetime(0) NULL DEFAULT NULL,
  `data_fim` datetime(0) NULL DEFAULT NULL,
  `descricao` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `id_arquivo` int(11) NOT NULL,
  `id_arquivo_extra` int(11) NOT NULL,
  `ids_arquivos_clubes` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `status_arquivos_clubes` int(11) NOT NULL,
  `origem_liga` int(11) NOT NULL,
  `id_fechamento_externo` int(11) NULL DEFAULT NULL,
  `slot_compartilhado` int(11) NOT NULL,
  `slot_compartilhado_agentes` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `slot_compartilhado_jogadores` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `tipo_fechamento` int(11) NULL DEFAULT NULL COMMENT 'para clube: 0 profit/loss - 1 fichas',
  `transactions` int(11) NOT NULL,
  `transactions_id` int(11) NOT NULL,
  `transactions_lancado` int(11) NOT NULL,
  `overlay_dados` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `overlay_calculado` int(11) NOT NULL,
  `dados_externos_json` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `dados_outros_json` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `diamantes_cotacao` decimal(20, 6) NOT NULL,
  `diamantes_fixo` decimal(20, 2) NOT NULL,
  `diamantes_fixo_total` decimal(20, 2) NOT NULL,
  `jackpot_total` decimal(20, 2) NOT NULL,
  `fichas_cotacao` decimal(20, 4) NOT NULL,
  `rake_total` decimal(30, 2) NOT NULL,
  `rake_agentes` decimal(30, 2) NOT NULL,
  `rake_clube` decimal(30, 2) NOT NULL,
  `rake_clubes` decimal(30, 2) NOT NULL,
  `rake_liga` decimal(30, 2) NOT NULL,
  `jogadores_unicos_ativos` int(11) NULL DEFAULT NULL,
  `jogadores_inscricoes` int(11) NULL DEFAULT NULL,
  `rake_ag_top10` decimal(30, 2) NOT NULL,
  `rake_ag_demais` decimal(30, 2) NOT NULL,
  `rake_jog_top20` decimal(30, 2) NOT NULL,
  `rake_jog_demais` decimal(30, 2) NOT NULL,
  `rake_clubes_top10` decimal(30, 2) NOT NULL,
  `rake_clubes_demais` decimal(30, 2) NOT NULL,
  `rake_mtt` decimal(30, 2) NOT NULL,
  `rake_ring` decimal(30, 2) NOT NULL,
  `rake_sng` decimal(30, 2) NOT NULL,
  `agentes_qtd` int(11) NULL DEFAULT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `usuario` int(11) NULL DEFAULT NULL,
  `etapa` int(11) NOT NULL,
  `etapa_overlay` int(11) NOT NULL,
  `upload_etapa` int(11) NOT NULL,
  `dashboard_version` int(11) NOT NULL,
  `arquivo_zip` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `status` int(11) NOT NULL,
  `excluido` int(11) NOT NULL,
  `up_json_union_diamond` int(11) NOT NULL,
  `up_json_members` int(11) NOT NULL,
  `up_json_transactions` int(11) NOT NULL,
  `up_json_rewards` int(11) NOT NULL,
  `up_json_init` int(11) NOT NULL,
  `versao` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 70 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_fechamentos_agentes
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_fechamentos_agentes`;
CREATE TABLE `clubesonline_fechamentos_agentes`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_fechamento` int(11) NULL DEFAULT NULL,
  `id_agente` int(11) NULL DEFAULT NULL,
  `id_agente_app` int(20) NULL DEFAULT NULL,
  `nome_agente` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `rake` decimal(20, 2) NOT NULL,
  `profit_loss` decimal(20, 2) NOT NULL,
  `diamantes` decimal(20, 2) NOT NULL,
  `diamantes_cotacao` decimal(20, 4) NOT NULL,
  `diamantes_custo` decimal(20, 2) NOT NULL,
  `bonus` decimal(20, 2) NOT NULL,
  `cash_back` decimal(20, 2) NOT NULL,
  `rewards` decimal(20, 2) NOT NULL,
  `taxa` decimal(20, 2) NOT NULL,
  `taxa_percent` decimal(20, 2) NOT NULL,
  `fichas_envio` decimal(20, 2) NOT NULL,
  `fichas_envio_diamantes` decimal(20, 2) NOT NULL,
  `fichas_envio_calculo` int(11) NOT NULL,
  `fichas_acerto` decimal(20, 2) NOT NULL,
  `fichas_acerto_diamantes` decimal(20, 2) NOT NULL,
  `vip_diamantes` decimal(20, 2) NOT NULL,
  `nivel_clube_diamantes` decimal(20, 2) NOT NULL,
  `mesas_abertura` decimal(20, 2) NOT NULL,
  `mesas_abertura_diamantes` decimal(20, 2) NOT NULL,
  `outros` decimal(20, 2) NOT NULL,
  `saldo_final` decimal(20, 2) NOT NULL,
  `fechamento_tipo` int(11) NOT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 415 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_fechamentos_clubes
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_fechamentos_clubes`;
CREATE TABLE `clubesonline_fechamentos_clubes`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_fechamento` int(11) NULL DEFAULT NULL,
  `id_clube` int(11) NULL DEFAULT NULL,
  `id_clube_app` int(20) NULL DEFAULT NULL,
  `nome_clube` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `slot_compartilhado` int(11) NOT NULL,
  `slot_compartilhado_agentes` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `slot_compartilhado_jogadores` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `rake` decimal(20, 2) NOT NULL,
  `fechamento_formato` int(11) NOT NULL,
  `fechamento_fichas` decimal(20, 2) NOT NULL,
  `profit_loss` decimal(20, 2) NOT NULL,
  `diamantes` decimal(20, 2) NOT NULL,
  `diamantes_cotacao` decimal(20, 6) NOT NULL,
  `diamantes_custo` decimal(20, 2) NOT NULL,
  `diamantes_fixo` decimal(20, 2) NOT NULL,
  `fichas` decimal(20, 2) NOT NULL,
  `fichas_cotacao` decimal(20, 4) NOT NULL,
  `fichas_custo` decimal(20, 2) NOT NULL,
  `bonus` decimal(20, 2) NOT NULL,
  `cash_back` decimal(20, 2) NOT NULL,
  `rewards` decimal(20, 2) NOT NULL,
  `taxa` decimal(20, 2) NOT NULL,
  `taxa_admin` decimal(20, 2) NOT NULL,
  `overlay` decimal(20, 2) NOT NULL,
  `overlay_app` decimal(20, 2) NOT NULL,
  `overlay_tipo` int(11) NOT NULL,
  `seguro` decimal(20, 2) NOT NULL,
  `seguro_percent_desconto` decimal(20, 2) NOT NULL,
  `seguro_liquido` decimal(20, 2) NOT NULL,
  `fichas_envio` decimal(20, 2) NOT NULL,
  `fichas_envio_diamantes` decimal(20, 2) NOT NULL,
  `fichas_envio_custo` decimal(20, 2) NOT NULL,
  `fichas_envio_calculo` int(11) NOT NULL,
  `fichas_envio_percent_desconto` decimal(20, 2) NOT NULL,
  `fichas_envio_liquido` decimal(20, 2) NOT NULL,
  `fichas_envio_origem_extra` int(11) NOT NULL,
  `fichas_envio_dados_extra` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `fichas_acerto` decimal(20, 2) NOT NULL,
  `fichas_acerto_diamantes` decimal(20, 2) NOT NULL,
  `fichas_acerto_custo` decimal(20, 2) NOT NULL,
  `chips_send_total` decimal(20, 2) NOT NULL,
  `chips_back_total` decimal(20, 2) NOT NULL,
  `vip_diamantes` decimal(20, 2) NOT NULL,
  `nivel_clube_diamantes` decimal(20, 2) NOT NULL,
  `outros_diamantes` decimal(20, 2) NOT NULL,
  `mesas_abertura_ring_total` decimal(20, 2) NOT NULL,
  `mesas_abertura_ring_clube` decimal(20, 2) NOT NULL,
  `mesas_abertura_mtt_total` decimal(20, 2) NOT NULL,
  `mesas_abertura_mtt_clube` decimal(20, 2) NOT NULL,
  `relatorios_total` decimal(20, 2) NOT NULL,
  `relatorios_clube` decimal(20, 2) NOT NULL,
  `clubes_filhos_valor` decimal(20, 2) NOT NULL,
  `clubes_filhos_registros` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `ticket_delivered` decimal(20, 2) NOT NULL,
  `ticket_buyin` decimal(20, 2) NOT NULL,
  `jackpot_fee` decimal(20, 2) NOT NULL,
  `jackpot_prizes` decimal(20, 2) NOT NULL,
  `chip_storm` decimal(20, 2) NOT NULL,
  `spinup_buyin` decimal(20, 2) NOT NULL,
  `spinup_prizes` decimal(20, 2) NOT NULL,
  `spinup_fee` decimal(20, 2) NOT NULL,
  `outros` decimal(20, 2) NOT NULL,
  `saldo_final` decimal(20, 2) NOT NULL,
  `status_gestores_sem_clube` int(11) NOT NULL,
  `status_agentes_sem_clube` int(11) NOT NULL,
  `status_jogadores_sem_clube` int(11) NOT NULL,
  `fec_diario` int(11) NOT NULL,
  `fec_diario_data_inicio` datetime(0) NULL DEFAULT NULL,
  `fec_diario_data_fim` datetime(0) NULL DEFAULT NULL,
  `fec_diario_id_arquivo` int(11) NOT NULL,
  `data_inicio` datetime(0) NULL DEFAULT NULL,
  `data_fim` datetime(0) NULL DEFAULT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 11379 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_fingeral
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_fingeral`;
CREATE TABLE `clubesonline_fingeral`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_categoria` int(11) NOT NULL,
  `id_forma_pgto` int(11) NOT NULL,
  `id_conta` int(11) NOT NULL,
  `id_fornecedor` int(11) NOT NULL,
  `tipo_lancamento` int(11) NOT NULL COMMENT '0 entrada / 1 saida',
  `valor` decimal(25, 2) NOT NULL,
  `pago` int(11) NOT NULL,
  `obs` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `usuario_id` int(11) NULL DEFAULT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `clubesonline_fingeral_id_index`(`id`) USING BTREE,
  INDEX `clubesonline_fingeral_id_categoria_index`(`id_categoria`) USING BTREE,
  INDEX `clubesonline_fingeral_id_forma_pgto_index`(`id_forma_pgto`) USING BTREE,
  INDEX `clubesonline_fingeral_id_conta_index`(`id_conta`) USING BTREE,
  INDEX `clubesonline_fingeral_id_fornecedor_index`(`id_fornecedor`) USING BTREE,
  INDEX `clubesonline_fingeral_tipo_lancamento_index`(`tipo_lancamento`) USING BTREE,
  INDEX `clubesonline_fingeral_pago_index`(`pago`) USING BTREE,
  INDEX `clubesonline_fingeral_usuario_id_index`(`usuario_id`) USING BTREE,
  INDEX `clubesonline_fingeral_data_hora_index`(`data_hora`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_fingeral_cats_default
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_fingeral_cats_default`;
CREATE TABLE `clubesonline_fingeral_cats_default`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `pgto_recebimento` int(11) NOT NULL,
  `transf_clubes` int(11) NOT NULL,
  `diamantes_vip` int(11) NOT NULL,
  `diamantes_nivel` int(11) NOT NULL,
  `fichas` int(11) NOT NULL,
  `deals` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `clubesonline_fingeral_id_index`(`id`) USING BTREE,
  INDEX `clubesonline_fingeral_id_categoria_index`(`pgto_recebimento`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_gestores
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_gestores`;
CREATE TABLE `clubesonline_gestores`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `id_app` int(20) NULL DEFAULT NULL,
  `id_clube` int(20) NULL DEFAULT NULL,
  `id_clube_app` int(20) NULL DEFAULT NULL,
  `excluido` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `nome_index`(`nome`(10)) USING BTREE,
  INDEX `excluido_index`(`excluido`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 18 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_jogadores
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_jogadores`;
CREATE TABLE `clubesonline_jogadores`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `id_app` int(20) NULL DEFAULT NULL,
  `id_clube` int(20) NULL DEFAULT NULL,
  `id_clube_app` int(20) NULL DEFAULT NULL,
  `excluido` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `nome_index`(`nome`(10)) USING BTREE,
  INDEX `excluido_index`(`excluido`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_lancamentos
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_lancamentos`;
CREATE TABLE `clubesonline_lancamentos`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tipo` int(11) NULL DEFAULT NULL,
  `id_clube` int(11) NULL DEFAULT NULL,
  `id_clube_app` int(20) NULL DEFAULT NULL,
  `agente_id_app` int(20) NULL DEFAULT NULL,
  `agente_nick` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `jogador_id_app` int(20) NULL DEFAULT NULL,
  `jogador_nick` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `prize_original` decimal(20, 2) NULL DEFAULT NULL,
  `prize_deal` decimal(20, 2) NULL DEFAULT NULL,
  `valor` decimal(20, 2) NULL DEFAULT NULL,
  `descricao` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `observacao` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `data_lancamento` date NULL DEFAULT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `id_option` int(11) NOT NULL,
  `id_usuario` int(11) NULL DEFAULT NULL,
  `id_fechamento` int(11) NULL DEFAULT NULL,
  `id_categoria` int(11) NULL DEFAULT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 14 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_lancamentos_opcoes
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_lancamentos_opcoes`;
CREATE TABLE `clubesonline_lancamentos_opcoes`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `titulo` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `descricao` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `id_cat_default` int(11) NOT NULL,
  `tipo` int(11) NOT NULL,
  `excluido` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `excluido_index`(`excluido`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_saldos
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_saldos`;
CREATE TABLE `clubesonline_saldos`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nivel_registro` int(11) NULL DEFAULT NULL COMMENT '1 liga - 2 clube - 3 agente - 4 jogador',
  `clube_id` int(11) NULL DEFAULT NULL,
  `agente_id` int(11) NULL DEFAULT NULL,
  `jogador_id` int(11) NULL DEFAULT NULL,
  `id_app` int(20) NULL DEFAULT NULL,
  `saldo` decimal(30, 2) NULL DEFAULT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `usuario_id` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_saldos_equilibrio
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_saldos_equilibrio`;
CREATE TABLE `clubesonline_saldos_equilibrio`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `origem_liga_id` int(11) NULL DEFAULT NULL,
  `origem_liga_nome` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `origem_clube_id` int(11) NULL DEFAULT NULL,
  `origem_clube_id_app` int(20) NULL DEFAULT NULL,
  `origem_clube_nome` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `valor` decimal(20, 4) NULL DEFAULT NULL,
  `destino_liga_id` int(11) NULL DEFAULT NULL,
  `destino_liga_nome` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `destino_clube_id` int(20) NULL DEFAULT NULL,
  `destino_clube_id_app` int(20) NULL DEFAULT NULL,
  `destino_clube_nome` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_taxas_admin_faixas
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_taxas_admin_faixas`;
CREATE TABLE `clubesonline_taxas_admin_faixas`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `valor_inicio` decimal(20, 4) NOT NULL,
  `valor_final` decimal(20, 4) NOT NULL,
  `percentual` decimal(20, 4) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 19 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_torneios_metas
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_torneios_metas`;
CREATE TABLE `clubesonline_torneios_metas`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_app` int(11) NULL DEFAULT NULL,
  `nome` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `inicio` datetime(0) NULL DEFAULT NULL,
  `late_register` datetime(0) NULL DEFAULT NULL,
  `slot_qtd` int(11) NULL DEFAULT NULL,
  `slot_acoes_meta` int(11) NULL DEFAULT NULL,
  `valor_garantido` decimal(20, 4) NULL DEFAULT NULL,
  `valor_buyin` decimal(20, 4) NULL DEFAULT NULL,
  `valor_rebuy` decimal(20, 4) NULL DEFAULT NULL,
  `valor_addon` decimal(20, 4) NULL DEFAULT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `usuario_id` int(11) NULL DEFAULT NULL,
  `torneio_vinculo` int(11) NOT NULL,
  `torneio_vinculo_id` int(11) NOT NULL,
  `fechado` int(11) NOT NULL,
  `excluido` int(11) NOT NULL,
  `upload_data_hora` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 382 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_torneios_metas_registros
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_torneios_metas_registros`;
CREATE TABLE `clubesonline_torneios_metas_registros`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_torneio` int(11) NULL DEFAULT NULL,
  `torneio_id_app` int(11) NULL DEFAULT NULL,
  `club_id` int(11) NULL DEFAULT NULL,
  `agent_id` int(11) NULL DEFAULT NULL,
  `player_id` int(11) NULL DEFAULT NULL,
  `player_name` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `buyin` int(11) NULL DEFAULT NULL,
  `rebuy` int(11) NULL DEFAULT NULL,
  `addon` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_torneios_metas_uploads
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_torneios_metas_uploads`;
CREATE TABLE `clubesonline_torneios_metas_uploads`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `arquivo` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `torneio_id_app` int(11) NULL DEFAULT NULL,
  `processando` int(11) NOT NULL COMMENT '0 nao / 1 em andamento / 2 finalizado',
  `error_fatal` int(11) NOT NULL,
  `error_notice` int(11) NOT NULL,
  `usuario_id` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 45 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_up_diamond_statement
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_up_diamond_statement`;
CREATE TABLE `clubesonline_up_diamond_statement`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_fechamento` int(11) NULL DEFAULT NULL,
  `id_arquivo` int(11) NULL DEFAULT NULL,
  `action` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `value` decimal(20, 4) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_fechamento_index`(`id_fechamento`) USING BTREE,
  INDEX `id_arquivo_index`(`id_arquivo`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_up_manager_credit_record
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_up_manager_credit_record`;
CREATE TABLE `clubesonline_up_manager_credit_record`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_fechamento` int(11) NULL DEFAULT NULL,
  `id_arquivo` int(11) NULL DEFAULT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `manager_name` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `manager_id` int(11) NULL DEFAULT NULL,
  `credits` decimal(20, 4) NOT NULL,
  `action` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `club_name` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `club_id` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_fechamento_index`(`id_fechamento`) USING BTREE,
  INDEX `id_arquivo_index`(`id_arquivo`) USING BTREE,
  INDEX `manager_id_index`(`manager_id`) USING BTREE,
  INDEX `club_id_index`(`club_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 461 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_up_member_statistics
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_up_member_statistics`;
CREATE TABLE `clubesonline_up_member_statistics`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_fechamento` int(11) NULL DEFAULT NULL,
  `id_arquivo` int(11) NULL DEFAULT NULL,
  `clube_id_app` int(11) NULL DEFAULT NULL,
  `clube_name` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `player_name` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `player_id` int(11) NULL DEFAULT NULL,
  `agent_name` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `agent_id` int(11) NULL DEFAULT NULL,
  `winnings` decimal(20, 4) NOT NULL,
  `fee` decimal(20, 4) NOT NULL,
  `ticket_delivered` decimal(20, 4) NOT NULL,
  `ticket_buyin` decimal(20, 4) NOT NULL,
  `jackpot_fee` decimal(20, 4) NOT NULL,
  `jackpot_prizes` decimal(20, 4) NOT NULL,
  `ev_share` decimal(20, 4) NOT NULL,
  `spinup_buyin` decimal(20, 4) NOT NULL,
  `spinup_prizes` decimal(20, 4) NOT NULL,
  `chip_storm` decimal(20, 4) NOT NULL,
  `insurance` decimal(20, 4) NOT NULL,
  `hands` decimal(20, 4) NOT NULL,
  `chip_send` decimal(20, 4) NOT NULL,
  `chip_back` decimal(20, 4) NOT NULL,
  `chip_exit` decimal(20, 4) NOT NULL,
  `credits_send` decimal(20, 4) NOT NULL,
  `credits_back` decimal(20, 4) NOT NULL,
  `credits_exit` decimal(20, 4) NOT NULL,
  `ref_id_clube` int(11) NOT NULL,
  `ref_union` int(1) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_fechamento_index`(`id_fechamento`) USING BTREE,
  INDEX `id_arquivo_index`(`id_arquivo`) USING BTREE,
  INDEX `clube_id_app_index`(`clube_id_app`) USING BTREE,
  INDEX `player_id_index`(`player_id`) USING BTREE,
  INDEX `agent_id_index`(`agent_id`) USING BTREE,
  INDEX `ref_id_clube_index`(`ref_id_clube`) USING BTREE,
  INDEX `ref_union_index`(`ref_union`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4736 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_up_overlay_clubes
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_up_overlay_clubes`;
CREATE TABLE `clubesonline_up_overlay_clubes`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_fechamento` int(11) NULL DEFAULT NULL,
  `torneio_id` int(11) NULL DEFAULT NULL,
  `slot_id` int(11) NULL DEFAULT NULL,
  `slot_nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `slot_overlay` decimal(20, 4) NOT NULL,
  `slot_meta` decimal(20, 4) NOT NULL,
  `ref_clube_id` int(11) NULL DEFAULT NULL,
  `compartilhado` int(11) NULL DEFAULT NULL,
  `venda_total` decimal(20, 4) NOT NULL,
  `meta_clube` decimal(20, 4) NOT NULL,
  `meta_clube_perc` decimal(20, 4) NULL DEFAULT NULL,
  `nao_atingido` decimal(20, 4) NOT NULL,
  `total_nao_atingido` decimal(20, 4) NOT NULL,
  `percentual` decimal(20, 4) NOT NULL,
  `overlay_final` decimal(20, 4) NOT NULL,
  `removido` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_fechamento_index`(`id_fechamento`) USING BTREE,
  INDEX `torneio_id_index`(`torneio_id`) USING BTREE,
  INDEX `slot_id_index`(`slot_id`) USING BTREE,
  INDEX `ref_clube_id_index`(`ref_clube_id`) USING BTREE,
  INDEX `removido_index`(`removido`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_up_overlay_percents
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_up_overlay_percents`;
CREATE TABLE `clubesonline_up_overlay_percents`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_clube` int(11) NULL DEFAULT NULL,
  `data_ini` datetime(0) NULL DEFAULT NULL,
  `data_fim` datetime(0) NULL DEFAULT NULL,
  `meta_percent` decimal(20, 4) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_clube_index`(`id_clube`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_up_overlay_registros
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_up_overlay_registros`;
CREATE TABLE `clubesonline_up_overlay_registros`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_fechamento` int(11) NULL DEFAULT NULL,
  `torneio_id` int(11) NULL DEFAULT NULL,
  `slot_id` int(11) NULL DEFAULT NULL,
  `player_id` int(11) NULL DEFAULT NULL,
  `player_name` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `agent_id` int(11) NULL DEFAULT NULL,
  `agent_name` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `valor` decimal(20, 4) NOT NULL,
  `ref_clube_id` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_fechamento_index`(`id_fechamento`) USING BTREE,
  INDEX `slot_id_index`(`slot_id`) USING BTREE,
  INDEX `player_id_index`(`player_id`) USING BTREE,
  INDEX `agent_id_index`(`agent_id`) USING BTREE,
  INDEX `ref_clube_id_index`(`ref_clube_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_up_overlay_slots
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_up_overlay_slots`;
CREATE TABLE `clubesonline_up_overlay_slots`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_fechamento` int(11) NULL DEFAULT NULL,
  `torneio_id` int(11) NULL DEFAULT NULL,
  `clube_id_app` int(11) NULL DEFAULT NULL,
  `clube_nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `meta` decimal(20, 4) NOT NULL,
  `meta_multiplicador` decimal(20, 4) NOT NULL,
  `overlay` decimal(20, 4) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_fechamento_index`(`id_fechamento`) USING BTREE,
  INDEX `torneio_id_index`(`torneio_id`) USING BTREE,
  INDEX `clube_id_app_index`(`clube_id_app`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_up_overlay_torneios
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_up_overlay_torneios`;
CREATE TABLE `clubesonline_up_overlay_torneios`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_fechamento` int(11) NULL DEFAULT NULL,
  `rewards_id` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `arrecadado` decimal(20, 4) NOT NULL,
  `pago` decimal(20, 4) NOT NULL,
  `overlay` decimal(20, 4) NOT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `removido` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_fechamento_index`(`id_fechamento`) USING BTREE,
  INDEX `removido_index`(`removido`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_up_rake_detalhes
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_up_rake_detalhes`;
CREATE TABLE `clubesonline_up_rake_detalhes`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_fechamento` int(11) NULL DEFAULT NULL,
  `id_arquivo` int(11) NULL DEFAULT NULL,
  `clube_id_app` int(11) NULL DEFAULT NULL,
  `player_id` int(11) NULL DEFAULT NULL,
  `agent_id` int(11) NULL DEFAULT NULL,
  `modalidade` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `rake` decimal(20, 4) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_fechamento_index`(`id_fechamento`) USING BTREE,
  INDEX `id_arquivo_index`(`id_arquivo`) USING BTREE,
  INDEX `clube_id_app_index`(`clube_id_app`) USING BTREE,
  INDEX `player_id_index`(`player_id`) USING BTREE,
  INDEX `agent_id_index`(`agent_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4454 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_up_rewards
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_up_rewards`;
CREATE TABLE `clubesonline_up_rewards`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_fechamento` int(11) NULL DEFAULT NULL,
  `clube_id_app` int(11) NULL DEFAULT NULL,
  `player_id` int(11) NULL DEFAULT NULL,
  `player_name` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `agent_id` int(11) NULL DEFAULT NULL,
  `agent_name` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `rake_total` decimal(20, 4) NOT NULL,
  `valor` decimal(20, 4) NOT NULL,
  `points` decimal(20, 4) NOT NULL,
  `tipo` int(11) NOT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `ref_id_clube` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_fechamento_index`(`id_fechamento`) USING BTREE,
  INDEX `clube_id_app_index`(`clube_id_app`) USING BTREE,
  INDEX `player_id_index`(`player_id`) USING BTREE,
  INDEX `agent_id_index`(`agent_id`) USING BTREE,
  INDEX `ref_id_clube_index`(`ref_id_clube`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_up_transactions
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_up_transactions`;
CREATE TABLE `clubesonline_up_transactions`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_fechamento` int(11) NULL DEFAULT NULL,
  `id_arquivo` int(11) NULL DEFAULT NULL,
  `clube_id_app` int(11) NULL DEFAULT NULL,
  `sender_player_id` int(11) NULL DEFAULT NULL,
  `sender_player_name` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `recipient_player_id` int(11) NULL DEFAULT NULL,
  `recipient_player_name` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `credits_send` decimal(20, 4) NOT NULL,
  `credits_back` decimal(20, 4) NOT NULL,
  `credits_exit` decimal(20, 4) NOT NULL,
  `chips_send` decimal(20, 4) NOT NULL,
  `chips_chip_storm` decimal(20, 4) NOT NULL,
  `chips_back` decimal(20, 4) NOT NULL,
  `chips_exit` decimal(20, 4) NOT NULL,
  `ticket_send` decimal(20, 4) NOT NULL,
  `ticket_back` decimal(20, 4) NOT NULL,
  `ticket_expire` decimal(20, 4) NOT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `ref_gestor` int(11) NOT NULL,
  `ref_id_clube` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_fechamento_index`(`id_fechamento`) USING BTREE,
  INDEX `id_arquivo_index`(`id_arquivo`) USING BTREE,
  INDEX `clube_id_app_index`(`clube_id_app`) USING BTREE,
  INDEX `sender_player_id_index`(`sender_player_id`) USING BTREE,
  INDEX `recipient_player_id_index`(`recipient_player_id`) USING BTREE,
  INDEX `ref_gestor_index`(`ref_gestor`) USING BTREE,
  INDEX `ref_id_clube_index`(`ref_id_clube`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_up_union_data
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_up_union_data`;
CREATE TABLE `clubesonline_up_union_data`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_fechamento` int(11) NULL DEFAULT NULL,
  `id_arquivo` int(11) NULL DEFAULT NULL,
  `clube_id_app` int(11) NULL DEFAULT NULL,
  `clube_name` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `profits` decimal(20, 4) NOT NULL,
  `winnings` decimal(20, 4) NOT NULL,
  `fee` decimal(20, 4) NOT NULL,
  `ticket_delivered` decimal(20, 4) NOT NULL,
  `ticket_buyin` decimal(20, 4) NOT NULL,
  `jackpot_fee` decimal(20, 4) NOT NULL,
  `jackpot_prizes` decimal(20, 4) NOT NULL,
  `spinup_buyin` decimal(20, 4) NOT NULL,
  `spinup_prizes` decimal(20, 4) NOT NULL,
  `chip_storm` decimal(20, 4) NOT NULL,
  `insurance` decimal(20, 4) NOT NULL,
  `gtd_cost` decimal(20, 4) NOT NULL,
  `games` decimal(20, 4) NOT NULL,
  `hands` decimal(20, 4) NOT NULL,
  `ref_compartilhado` int(11) NOT NULL,
  `ref_union` int(1) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_fechamento_index`(`id_fechamento`) USING BTREE,
  INDEX `ref_compartilhado_index`(`ref_compartilhado`) USING BTREE,
  INDEX `ref_union_index`(`ref_union`) USING BTREE,
  INDEX `clube_id_app_index`(`clube_id_app`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 916 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_uploads
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_uploads`;
CREATE TABLE `clubesonline_uploads`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_fechamento` int(11) NULL DEFAULT NULL,
  `id_slot` int(11) NOT NULL,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `file` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `descricao` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `externo` int(11) NOT NULL,
  `externo_id_arquivo` int(11) NULL DEFAULT NULL,
  `externo_id_liga` int(20) NULL DEFAULT NULL,
  `data_arquivo` datetime(0) NULL DEFAULT NULL,
  `data_inicio` datetime(0) NULL DEFAULT NULL,
  `data_fim` datetime(0) NULL DEFAULT NULL,
  `dados` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `dados_copia_original` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `registrado_liga` int(11) NOT NULL,
  `registrado_clubes` int(11) NOT NULL,
  `id_usuario` int(11) NULL DEFAULT NULL,
  `upload_inicio` datetime(0) NULL DEFAULT NULL,
  `upload_fim` datetime(0) NULL DEFAULT NULL,
  `upload_duracao` datetime(0) NULL DEFAULT NULL,
  `leitura_duracao` datetime(0) NULL DEFAULT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `leitura_etapa` int(11) NOT NULL,
  `leitura_linha` int(11) NOT NULL,
  `excluido` int(11) NOT NULL,
  `error_fatal` int(11) NOT NULL,
  `error_notice` int(11) NOT NULL,
  `status` int(11) NOT NULL,
  `versao` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `nome_index`(`nome`(10)) USING BTREE,
  INDEX `excluido_index`(`data_hora`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 80 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_uploads_errors
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_uploads_errors`;
CREATE TABLE `clubesonline_uploads_errors`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_arquivo` int(11) NULL DEFAULT NULL,
  `id_arquivo_torneio_meta` int(11) NULL DEFAULT NULL,
  `error_tipo` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `error_inf` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 356 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_usuarios
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_usuarios`;
CREATE TABLE `clubesonline_usuarios`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `login` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `senha` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `nivel` int(11) NULL DEFAULT NULL,
  `codigo` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `lang_layout` int(11) NULL DEFAULT NULL,
  `observacao` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `id_agente` int(11) NULL DEFAULT NULL,
  `excluido` int(11) NULL DEFAULT NULL,
  `ativo` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `excluido_index`(`excluido`) USING BTREE,
  INDEX `ativo_index`(`ativo`) USING BTREE,
  INDEX `clubesonline_usuarios_nivel_index`(`nivel`) USING BTREE,
  INDEX `clubesonline_usuarios_id_agente_index`(`id_agente`) USING BTREE,
  INDEX `clubesonline_usuarios_excluido_index`(`excluido`) USING BTREE,
  INDEX `clubesonline_usuarios_ativo_index`(`ativo`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_vendas
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_vendas`;
CREATE TABLE `clubesonline_vendas`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nivel_registro` int(11) NULL DEFAULT NULL COMMENT '1 liga - 2 clube - 3 agente - 4 jogador',
  `clube_id` int(11) NULL DEFAULT NULL,
  `agente_id` int(11) NULL DEFAULT NULL,
  `jogador_id` int(11) NULL DEFAULT NULL,
  `id_app` int(20) NULL DEFAULT NULL,
  `fichas` decimal(30, 2) NULL DEFAULT NULL,
  `fichas_valor` decimal(30, 2) NULL DEFAULT NULL,
  `valor` decimal(30, 2) NULL DEFAULT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `id_categoria` int(11) NULL DEFAULT NULL,
  `id_option` int(11) NOT NULL,
  `usuario_id` int(11) NULL DEFAULT NULL,
  `usuario_tipo` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT 'sistema (tabela usuarios) / co_agentes (tabela clubesonline_agentes)',
  `usuario_mult_id_liga` int(11) NULL DEFAULT NULL,
  `usuario_mult_id` int(11) NULL DEFAULT NULL,
  `usuario_mult_nome` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `descricao` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `obs` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `saldo_transferencia` decimal(30, 2) NULL DEFAULT NULL,
  `oculto` int(11) NOT NULL,
  `lancamento_automatico` int(11) NOT NULL,
  `transferencia` int(11) NOT NULL,
  `transferencia_id_venda_ref` int(11) NOT NULL,
  `arquivo_id` int(11) NOT NULL,
  `fechamento_id` int(11) NULL DEFAULT NULL,
  `fechamento_clube_id` int(11) NULL DEFAULT NULL,
  `fechamento_agente_id` int(11) NULL DEFAULT NULL,
  `movimentacao_clubes` int(11) NOT NULL,
  `movimentacao_clube_id` int(11) NULL DEFAULT NULL,
  `transactions_id` int(11) NOT NULL,
  `liga_id_ref` int(11) NULL DEFAULT NULL,
  `solicitacao_id` int(11) NULL DEFAULT NULL,
  `comprovantes` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `clubesonline_vendas_nivel_registro_index`(`nivel_registro`) USING BTREE,
  INDEX `clubesonline_vendas_clube_id_index`(`clube_id`) USING BTREE,
  INDEX `clubesonline_vendas_agente_id_index`(`agente_id`) USING BTREE,
  INDEX `clubesonline_vendas_jogador_id_index`(`jogador_id`) USING BTREE,
  INDEX `clubesonline_vendas_id_app_index`(`id_app`) USING BTREE,
  INDEX `clubesonline_vendas_data_hora_index`(`data_hora`) USING BTREE,
  INDEX `clubesonline_vendas_usuario_id_index`(`usuario_id`) USING BTREE,
  INDEX `clubesonline_vendas_oculto_index`(`oculto`) USING BTREE,
  INDEX `clubesonline_vendas_lancamento_automatico_index`(`lancamento_automatico`) USING BTREE,
  INDEX `clubesonline_vendas_transferencia_index`(`transferencia`) USING BTREE,
  INDEX `clubesonline_vendas_transferencia_id_venda_ref_index`(`transferencia_id_venda_ref`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 82 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for clubesonline_vendas_pgtos
-- ----------------------------
DROP TABLE IF EXISTS `clubesonline_vendas_pgtos`;
CREATE TABLE `clubesonline_vendas_pgtos`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nivel_registro` int(11) NULL DEFAULT NULL,
  `clube_id` int(11) NULL DEFAULT NULL,
  `agente_id` int(11) NULL DEFAULT NULL,
  `jogador_id` int(11) NULL DEFAULT NULL,
  `id_app` int(11) NULL DEFAULT NULL,
  `id_venda` int(11) NULL DEFAULT NULL,
  `id_forma_pgto` int(11) NULL DEFAULT NULL,
  `id_categoria` int(11) NULL DEFAULT NULL,
  `id_option` int(11) NOT NULL,
  `tipo_lancamento` int(11) NOT NULL,
  `valor` decimal(20, 2) NULL DEFAULT NULL,
  `valor_taxa` decimal(20, 2) NULL DEFAULT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `usuario_id` int(11) NULL DEFAULT NULL,
  `usuario_tipo` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT 'sistema (tabela usuarios) / co_agentes (tabela clubesonline_agentes)',
  `usuario_mult_id_liga` int(11) NULL DEFAULT NULL,
  `usuario_mult_id` int(11) NULL DEFAULT NULL,
  `usuario_mult_nome` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `arquivo_id` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `clubesonline_vendas_pgtos_nivel_registro_index`(`nivel_registro`) USING BTREE,
  INDEX `clubesonline_vendas_pgtos_clube_id_index`(`clube_id`) USING BTREE,
  INDEX `clubesonline_vendas_pgtos_agente_id_index`(`agente_id`) USING BTREE,
  INDEX `clubesonline_vendas_pgtos_jogador_id_index`(`jogador_id`) USING BTREE,
  INDEX `clubesonline_vendas_pgtos_id_app_index`(`id_app`) USING BTREE,
  INDEX `clubesonline_vendas_pgtos_id_venda_index`(`id_venda`) USING BTREE,
  INDEX `clubesonline_vendas_pgtos_id_forma_pgto_index`(`id_forma_pgto`) USING BTREE,
  INDEX `clubesonline_vendas_pgtos_tipo_lancamento_index`(`tipo_lancamento`) USING BTREE,
  INDEX `clubesonline_vendas_pgtos_data_hora_index`(`data_hora`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 34 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for configs
-- ----------------------------
DROP TABLE IF EXISTS `configs`;
CREATE TABLE `configs`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `clientes_limite` int(11) NOT NULL,
  `clientes_foto` int(11) NOT NULL,
  `clientes_nasc` int(11) NOT NULL,
  `clientes_sexo` int(11) NOT NULL,
  `clientes_doc` int(11) NOT NULL,
  `clientes_rg` int(11) NOT NULL,
  `clientes_cpf` int(11) NOT NULL,
  `clientes_outrodoc` int(11) NOT NULL,
  `clientes_end` int(11) NOT NULL,
  `clientes_cidade` int(11) NOT NULL,
  `clientes_uf` int(11) NOT NULL,
  `clientes_pais` int(11) NOT NULL,
  `clientes_cel` int(11) NOT NULL,
  `clientes_tel` int(11) NOT NULL,
  `clientes_email` int(11) NOT NULL,
  `clientes_nick` int(11) NOT NULL,
  `cash_gaveta_full` int(11) NOT NULL,
  `cash_saldo_ticket` int(11) NOT NULL,
  `gorjeta_clube` int(11) NOT NULL,
  `ranking_desempate` int(11) NOT NULL,
  `ranking_pontos` int(11) NOT NULL,
  `cash_arredondamento` int(11) NOT NULL,
  `cash_imp_recibo` int(11) NOT NULL,
  `cash_qtd_impressoras` int(11) NOT NULL,
  `clientes_pesq_cod` int(11) NOT NULL,
  `clientes_pesq_doc` int(11) NOT NULL,
  `clientes_pesq_email` int(11) NOT NULL,
  `clientes_pesq_celular` int(11) NOT NULL,
  `clientes_pesq_cpf` int(11) NOT NULL,
  `clientes_pesq_rg` int(11) NOT NULL,
  `clientes_pesq_outrodoc` int(11) NOT NULL,
  `clientes_pesq_foto` int(11) NOT NULL,
  `clientes_pesq_comanda` int(11) NOT NULL,
  `clientes_pesq_nick` int(11) NOT NULL,
  `bar_ticket_venda` int(11) NOT NULL,
  `bar_pgto_valor_bloqueio` int(11) NOT NULL,
  `cartao_taxa_deb` decimal(20, 2) NOT NULL,
  `cartao_taxa_cred` decimal(20, 2) NOT NULL,
  `cartao_taxa_arredondar` int(11) NOT NULL,
  `retencao_estrangeiro` int(11) NOT NULL,
  `retencao_estrangeiro_taxa` decimal(20, 2) NOT NULL,
  `evento_ir_brasileiros` int(11) NOT NULL,
  `evento_ir_brasileiros_taxa` decimal(20, 2) NOT NULL,
  `evento_ir_estrangeiros` int(11) NOT NULL,
  `evento_ir_estrangeiros_taxa` decimal(20, 2) NOT NULL,
  `evento_venda_pgto_maior` int(11) NOT NULL,
  `evento_desconto_vinculo_credito` int(11) NOT NULL,
  `evento_deposito_antecipado_ativado` int(11) NOT NULL,
  `evento_deposito_antecipado_bloquear_saque` int(11) NOT NULL,
  `evento_aporte_sem_saldo` int(11) NOT NULL,
  `evento_sit_criar_automatico` int(11) NOT NULL,
  `evento_premiacao_autorizar_credito` int(11) NOT NULL,
  `evento_vaga_conta_obrigatorio` int(11) NOT NULL,
  `termo_uso` int(11) NOT NULL,
  `simbolo_monetario` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `fingeral_juros_tipo` int(11) NOT NULL,
  `clubesonline_simbolo_monetario` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `clubesonline_simbolo_moeda_ficticio` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `clubesonline_nome_moeda_ficticio` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `clubesonline_valor_moeda_ficticio` decimal(30, 2) NULL DEFAULT NULL,
  `clubesonline_id_liga` int(20) NULL DEFAULT NULL,
  `clubesonline_agente_pesq_jog` int(11) NOT NULL,
  `clubesonline_jog_pesq_agente` int(11) NOT NULL,
  `clubesonline_cotacao_diamantes` decimal(30, 6) NULL DEFAULT NULL,
  `clubesonline_conversao_fichas_diamantes` decimal(30, 2) NULL DEFAULT NULL,
  `clubesonline_cotacao_fichas` decimal(30, 4) NULL DEFAULT NULL,
  `clubesonline_diamantes_acao_abertura_mesas_ring` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `clubesonline_diamantes_acao_abertura_mesas_mtt` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `clubesonline_diamantes_acao_relatorios` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `clubesonline_diamantes_fixo` decimal(30, 2) NOT NULL,
  `clubesonline_taxa_liga` decimal(30, 2) NULL DEFAULT NULL,
  `clubesonline_rake_overlay` decimal(30, 2) NULL DEFAULT NULL,
  `clubesonline_agente_jackpot_fechamento` int(11) NOT NULL,
  `rep_moeda_virtual_taxa_clube_jogador` decimal(20, 4) NOT NULL,
  `rep_moeda_virtual_taxa_jogador_jogador` decimal(20, 4) NOT NULL,
  `rep_moeda_virtual_taxa_jogador_clube` decimal(20, 4) NOT NULL,
  `gameid_utilizar_credito_negativo` int(11) NOT NULL,
  `gameid_vinculo_automatico` int(11) NOT NULL,
  `gameid_vinculo_automatico_dados` int(11) NOT NULL,
  `gameid_cadastro_automatico` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for configs_atualizacao
-- ----------------------------
DROP TABLE IF EXISTS `configs_atualizacao`;
CREATE TABLE `configs_atualizacao`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `permissoes_aba_torneio` int(11) NOT NULL,
  `torneio_data_abertura` int(11) NOT NULL,
  `fingeral_abertos_vencidos_jogadores` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for configs_avisos
-- ----------------------------
DROP TABLE IF EXISTS `configs_avisos`;
CREATE TABLE `configs_avisos`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `usuario` int(11) NULL DEFAULT NULL,
  `tipo` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `referencia` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `usuario_index`(`usuario`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 91 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for configs_codbloq
-- ----------------------------
DROP TABLE IF EXISTS `configs_codbloq`;
CREATE TABLE `configs_codbloq`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_usuario` int(11) NOT NULL,
  `horario` timestamp(0) NOT NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP,
  `cod` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `id_usuario_index`(`id_usuario`) USING BTREE,
  INDEX `cod_index`(`cod`(10)) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1269 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for configs_db_migration
-- ----------------------------
DROP TABLE IF EXISTS `configs_db_migration`;
CREATE TABLE `configs_db_migration`  (
  `version` bigint(20) NOT NULL
) ENGINE = MyISAM CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed;

-- ----------------------------
-- Table structure for configs_gastos_modulos
-- ----------------------------
DROP TABLE IF EXISTS `configs_gastos_modulos`;
CREATE TABLE `configs_gastos_modulos`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `modulo` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `cadastro_outros` int(11) NOT NULL,
  `cadastro_cash` int(11) NOT NULL,
  `cadastro_torneio` int(11) NOT NULL,
  `cadastro_bar` int(11) NOT NULL,
  `cash_abertos` int(11) NOT NULL,
  `torneio_abertos` int(11) NOT NULL,
  `bar_abertos` int(11) NOT NULL,
  `fingeral_registros` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for configs_logs
-- ----------------------------
DROP TABLE IF EXISTS `configs_logs`;
CREATE TABLE `configs_logs`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `modulo` int(11) NULL DEFAULT NULL,
  `modulo_id` int(11) NULL DEFAULT NULL,
  `usuario` int(11) NULL DEFAULT NULL,
  `cod_acesso` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `ip` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cadastro` int(11) NULL DEFAULT NULL,
  `acao_id` int(11) NULL DEFAULT NULL,
  `acao_desc` int(11) NULL DEFAULT NULL,
  `acao_html` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `valor` decimal(20, 2) NULL DEFAULT NULL,
  `forma_pgto` int(11) NULL DEFAULT NULL,
  `qtd` int(11) NULL DEFAULT NULL,
  `cod_bloq` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `log_referencia` int(11) NULL DEFAULT NULL,
  `ext_obs` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `ext_produto` int(11) NULL DEFAULT NULL,
  `ext_cliente` int(11) NULL DEFAULT NULL,
  `ext_forma_pgto` int(11) NULL DEFAULT NULL,
  `ext_centro_custo` int(11) NULL DEFAULT NULL,
  `ext_valor` decimal(20, 2) NULL DEFAULT NULL,
  `ext_bar_comanda` int(11) NULL DEFAULT NULL,
  `ext_int` int(11) NULL DEFAULT NULL,
  `ext_text` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `ext_user_autorizado` int(11) NULL DEFAULT NULL,
  `ext_trn_id_item` int(11) NULL DEFAULT NULL,
  `ext_vaga_id_grupo` int(11) NULL DEFAULT NULL,
  `ext_id_jackpot` int(11) NULL DEFAULT NULL,
  `ext_id_torneio` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `id_index`(`id`) USING BTREE,
  INDEX `modulo_index`(`modulo`) USING BTREE,
  INDEX `modulo_id_index`(`modulo_id`) USING BTREE,
  INDEX `usuario_index`(`usuario`) USING BTREE,
  INDEX `cadastro_index`(`cadastro`) USING BTREE,
  INDEX `acao_id_index`(`acao_id`) USING BTREE,
  INDEX `acao_desc_index`(`acao_desc`) USING BTREE,
  INDEX `log_referencia_index`(`log_referencia`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6703 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for configs_logs_acoes
-- ----------------------------
DROP TABLE IF EXISTS `configs_logs_acoes`;
CREATE TABLE `configs_logs_acoes`  (
  `id` int(11) NOT NULL,
  `acao` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for configs_logs_desc
-- ----------------------------
DROP TABLE IF EXISTS `configs_logs_desc`;
CREATE TABLE `configs_logs_desc`  (
  `id_modulo` int(11) NULL DEFAULT NULL,
  `id_desc` int(11) NULL DEFAULT NULL,
  `descricao` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for configs_logs_modulos
-- ----------------------------
DROP TABLE IF EXISTS `configs_logs_modulos`;
CREATE TABLE `configs_logs_modulos`  (
  `id` int(11) NOT NULL,
  `modulo` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `sistema` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for configs_templats
-- ----------------------------
DROP TABLE IF EXISTS `configs_templats`;
CREATE TABLE `configs_templats`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `trn_ticket_venda` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `trn_dir_imagem` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for dev_acao
-- ----------------------------
DROP TABLE IF EXISTS `dev_acao`;
CREATE TABLE `dev_acao`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `home_id` int(11) NOT NULL,
  `acao` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `dados` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `header` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 21916 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eventos_
-- ----------------------------
DROP TABLE IF EXISTS `eventos_`;
CREATE TABLE `eventos_`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `unidade` int(11) NOT NULL,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `data_inicio` datetime(0) NULL DEFAULT NULL,
  `data_termino` datetime(0) NULL DEFAULT NULL,
  `data_hora_abertura` datetime(0) NOT NULL,
  `data_hora_fechamento` datetime(0) NULL DEFAULT NULL,
  `id_usuario_abertura` int(11) NOT NULL,
  `id_usuario_fechamento` int(11) NULL DEFAULT NULL,
  `descricao` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `dealers_cod_checkin` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `metas_bloquear` int(11) NOT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 42 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eventos_caixa_lancamentos
-- ----------------------------
DROP TABLE IF EXISTS `eventos_caixa_lancamentos`;
CREATE TABLE `eventos_caixa_lancamentos`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `horario` datetime(0) NULL DEFAULT NULL,
  `id_evento` int(11) NULL DEFAULT NULL,
  `id_periodo` int(11) NULL DEFAULT NULL,
  `id_jogador` int(11) NULL DEFAULT NULL,
  `id_time` int(11) NULL DEFAULT NULL,
  `id_jog_transf` int(11) NULL DEFAULT NULL,
  `tipo` int(11) NULL DEFAULT NULL,
  `obs` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `distribuicao_premiacao` int(11) NOT NULL,
  `saldo_premiacao` decimal(20, 2) NULL DEFAULT NULL,
  `saldo_caixas` decimal(20, 2) NULL DEFAULT NULL,
  `saldo_torneios` decimal(20, 2) NULL DEFAULT NULL,
  `saldo_cadastro` decimal(20, 2) NULL DEFAULT NULL,
  `saldo_compras_deducao` decimal(20, 2) NULL DEFAULT NULL,
  `tipo_ir` int(11) NOT NULL,
  `base_ir` decimal(20, 2) NULL DEFAULT NULL,
  `retido_ir` decimal(20, 2) NULL DEFAULT NULL,
  `saldo_evento` decimal(20, 2) NULL DEFAULT NULL,
  `saldo_final` decimal(20, 2) NULL DEFAULT NULL,
  `id_gameid_venda` int(11) NOT NULL,
  `id_usuario` int(11) NULL DEFAULT NULL,
  `id_caixa_user` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_evento_index`(`id_evento`) USING BTREE,
  INDEX `id_periodo_index`(`id_periodo`) USING BTREE,
  INDEX `id_jogador_index`(`id_jogador`) USING BTREE,
  INDEX `tipo_ir_index`(`tipo_ir`) USING BTREE,
  INDEX `id_usuario_index`(`id_usuario`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 845 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eventos_caixa_usuarios
-- ----------------------------
DROP TABLE IF EXISTS `eventos_caixa_usuarios`;
CREATE TABLE `eventos_caixa_usuarios`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_evento` int(11) NULL DEFAULT NULL,
  `id_periodo` int(11) NULL DEFAULT NULL,
  `id_usuario` int(11) NOT NULL,
  `data_abertura` datetime(0) NULL DEFAULT NULL,
  `data_fechamento` datetime(0) NULL DEFAULT NULL,
  `id_usuario_abertura` int(11) NULL DEFAULT NULL,
  `id_usuario_fechamento` int(11) NOT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_evento_index`(`id_usuario_fechamento`) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 64 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eventos_caixa_usuarios_fechamentos
-- ----------------------------
DROP TABLE IF EXISTS `eventos_caixa_usuarios_fechamentos`;
CREATE TABLE `eventos_caixa_usuarios_fechamentos`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_caixa_usuario` int(11) NULL DEFAULT NULL,
  `id_forma_pgto` int(11) NULL DEFAULT NULL,
  `sistema_valor` decimal(20, 4) NOT NULL,
  `sistema_taxa` decimal(20, 4) NOT NULL,
  `declarado_valor` decimal(20, 4) NOT NULL,
  `declarado_taxa` decimal(20, 4) NOT NULL,
  `resultado` decimal(20, 4) NOT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 213 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eventos_clientes_registros
-- ----------------------------
DROP TABLE IF EXISTS `eventos_clientes_registros`;
CREATE TABLE `eventos_clientes_registros`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `horario` datetime(0) NULL DEFAULT NULL,
  `id_jogador` int(11) NULL DEFAULT NULL,
  `dinheiro` decimal(10, 0) NULL DEFAULT NULL,
  `cartao` decimal(10, 0) NULL DEFAULT NULL,
  `cartao_cred` decimal(10, 0) NULL DEFAULT NULL,
  `cartao_taxa_deb` decimal(10, 0) NULL DEFAULT NULL,
  `cartao_taxa_cred` decimal(10, 0) NULL DEFAULT NULL,
  `cheque` decimal(10, 0) NULL DEFAULT NULL,
  `cortesia` decimal(10, 0) NULL DEFAULT NULL,
  `tipo` int(11) NULL DEFAULT NULL,
  `id_usuario` int(11) NULL DEFAULT NULL,
  `id_evento_caixa` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_jogador_index`(`id_jogador`) USING BTREE,
  INDEX `tipo_index`(`tipo`) USING BTREE,
  INDEX `id_evento_caixa_index`(`id_evento_caixa`) USING BTREE,
  INDEX `id_usuario_index`(`id_usuario`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eventos_creditos
-- ----------------------------
DROP TABLE IF EXISTS `eventos_creditos`;
CREATE TABLE `eventos_creditos`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_jogador` int(11) NOT NULL,
  `id_etapa` int(11) NOT NULL,
  `valor` decimal(20, 2) NOT NULL,
  `observacao` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `doc_nome` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `doc_numero` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `doc_banco` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `doc_agencia` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `doc_conta` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `id_usuario` int(11) NOT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `fechado` int(11) NOT NULL,
  `fechado_id_usuario` int(11) NOT NULL,
  `fechado_data_hora` datetime(0) NULL DEFAULT NULL,
  `excluido` int(11) NOT NULL,
  `excluido_id_usuario` int(11) NOT NULL,
  `excluido_data_hora` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 80 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eventos_dealers
-- ----------------------------
DROP TABLE IF EXISTS `eventos_dealers`;
CREATE TABLE `eventos_dealers`  (
  `id` int(20) NOT NULL AUTO_INCREMENT,
  `id_evento` int(11) NOT NULL,
  `id_usuario` int(11) NOT NULL,
  `checkin` datetime(0) NULL DEFAULT NULL,
  `checkout` datetime(0) NULL DEFAULT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `cod_expire` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eventos_dealers_solicitacao_staff
-- ----------------------------
DROP TABLE IF EXISTS `eventos_dealers_solicitacao_staff`;
CREATE TABLE `eventos_dealers_solicitacao_staff`  (
  `id` int(20) NOT NULL AUTO_INCREMENT,
  `id_evento` int(11) NOT NULL,
  `id_torneio` int(11) NOT NULL,
  `id_torneio_mesa` int(11) NOT NULL,
  `id_dealer` int(11) NOT NULL,
  `motivo` int(11) NOT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `retorno_id_usuario` int(11) NOT NULL,
  `retorno_data_hora` datetime(0) NULL DEFAULT NULL,
  `finalizado` int(11) NOT NULL,
  `finalizado_obs` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `finalizado_data_hora` datetime(0) NULL DEFAULT NULL,
  `cancelado` int(11) NOT NULL,
  `cancelado_data_hora` datetime(0) NULL DEFAULT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eventos_entrada_saida
-- ----------------------------
DROP TABLE IF EXISTS `eventos_entrada_saida`;
CREATE TABLE `eventos_entrada_saida`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `horario` datetime(0) NULL DEFAULT NULL,
  `id_forma_pgto` int(11) NULL DEFAULT NULL,
  `valor` decimal(20, 2) NULL DEFAULT NULL,
  `valor_taxa` decimal(20, 2) NULL DEFAULT NULL,
  `dinheiro` decimal(20, 2) NULL DEFAULT NULL,
  `cartao` decimal(20, 2) NULL DEFAULT NULL,
  `cartao_cred` decimal(20, 2) NULL DEFAULT NULL,
  `cheque` decimal(20, 2) NULL DEFAULT NULL,
  `obs` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `id_usuario_autorizacao` int(11) NULL DEFAULT NULL,
  `id_usuario_assinatura` int(11) NULL DEFAULT NULL,
  `id_evento` int(11) NULL DEFAULT NULL,
  `id_periodo` int(11) NULL DEFAULT NULL,
  `id_caixa_user` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_forma_pgto_index`(`id_forma_pgto`) USING BTREE,
  INDEX `id_periodo_index`(`id_periodo`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 96 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eventos_fingeral_caixas
-- ----------------------------
DROP TABLE IF EXISTS `eventos_fingeral_caixas`;
CREATE TABLE `eventos_fingeral_caixas`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `obs` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `id_evento` int(11) NOT NULL,
  `usuario_id` int(11) NULL DEFAULT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `status` int(11) NOT NULL,
  `fechado` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `clubesonline_fingeral_id_index`(`id`) USING BTREE,
  INDEX `clubesonline_fingeral_usuario_id_index`(`usuario_id`) USING BTREE,
  INDEX `clubesonline_fingeral_data_hora_index`(`data_hora`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 31 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eventos_fingeral_filtros
-- ----------------------------
DROP TABLE IF EXISTS `eventos_fingeral_filtros`;
CREATE TABLE `eventos_fingeral_filtros`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `dados` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `clubesonline_fingeral_id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eventos_fingeral_registros
-- ----------------------------
DROP TABLE IF EXISTS `eventos_fingeral_registros`;
CREATE TABLE `eventos_fingeral_registros`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_caixa_geral` int(11) NULL DEFAULT NULL,
  `id_periodo` int(11) NULL DEFAULT NULL,
  `id_caixa_user` int(11) NULL DEFAULT NULL,
  `tipo_movimentacao` int(11) NOT NULL COMMENT '0 manual / 1 aportes em caixas / 2 sangrias em caixas / 3 fechamentos de caixas',
  `id_categoria` int(11) NOT NULL,
  `id_forma_pgto` int(11) NOT NULL,
  `id_conta` int(11) NOT NULL,
  `id_fornecedor` int(11) NOT NULL,
  `tipo_lancamento` int(11) NOT NULL COMMENT '0 entrada / 1 saida',
  `descricao` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `valor` decimal(25, 2) NOT NULL,
  `valor_taxa` decimal(25, 2) NOT NULL,
  `obs` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `id_referencia` int(11) NULL DEFAULT NULL,
  `id_caixa_geral_transf` int(11) NULL DEFAULT NULL,
  `rel_despesa` int(11) NOT NULL,
  `usuario_id` int(11) NULL DEFAULT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `clubesonline_fingeral_id_index`(`id`) USING BTREE,
  INDEX `clubesonline_fingeral_id_categoria_index`(`id_categoria`) USING BTREE,
  INDEX `clubesonline_fingeral_id_forma_pgto_index`(`id_forma_pgto`) USING BTREE,
  INDEX `clubesonline_fingeral_id_conta_index`(`id_conta`) USING BTREE,
  INDEX `clubesonline_fingeral_id_fornecedor_index`(`id_fornecedor`) USING BTREE,
  INDEX `clubesonline_fingeral_tipo_lancamento_index`(`tipo_lancamento`) USING BTREE,
  INDEX `clubesonline_fingeral_usuario_id_index`(`usuario_id`) USING BTREE,
  INDEX `clubesonline_fingeral_data_hora_index`(`data_hora`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 141 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eventos_imposto
-- ----------------------------
DROP TABLE IF EXISTS `eventos_imposto`;
CREATE TABLE `eventos_imposto`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_evento` int(11) NOT NULL,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `tipo_calculo` int(11) NOT NULL COMMENT '0 lucro / 1 premiacao bruta',
  `valor_reter` int(11) NOT NULL,
  `valor_minimo_retencao` decimal(20, 4) NOT NULL COMMENT 'valor minimo para ser feito a retenção',
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 36 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eventos_imposto_faixas
-- ----------------------------
DROP TABLE IF EXISTS `eventos_imposto_faixas`;
CREATE TABLE `eventos_imposto_faixas`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_imposto` int(11) NOT NULL,
  `valor_min` decimal(20, 4) NOT NULL,
  `valor_max` decimal(20, 4) NOT NULL,
  `taxa` decimal(20, 4) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 108 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eventos_imposto_paises
-- ----------------------------
DROP TABLE IF EXISTS `eventos_imposto_paises`;
CREATE TABLE `eventos_imposto_paises`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_imposto` int(11) NOT NULL,
  `id_pais` int(11) NOT NULL,
  `tipo` int(11) NOT NULL COMMENT '0 considera / 1 desconsidera',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 50 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eventos_mesas
-- ----------------------------
DROP TABLE IF EXISTS `eventos_mesas`;
CREATE TABLE `eventos_mesas`  (
  `id` int(20) NOT NULL AUTO_INCREMENT,
  `id_evento` int(11) NOT NULL,
  `id_area` int(11) NOT NULL,
  `titulo` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `lugares` int(11) NOT NULL,
  `ordem` int(11) NOT NULL,
  `codigo` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eventos_mesas_areas
-- ----------------------------
DROP TABLE IF EXISTS `eventos_mesas_areas`;
CREATE TABLE `eventos_mesas_areas`  (
  `id` int(20) NOT NULL AUTO_INCREMENT,
  `id_evento` int(11) NOT NULL,
  `nome` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eventos_metas_grupos
-- ----------------------------
DROP TABLE IF EXISTS `eventos_metas_grupos`;
CREATE TABLE `eventos_metas_grupos`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `icone` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cor` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eventos_metas_periodos
-- ----------------------------
DROP TABLE IF EXISTS `eventos_metas_periodos`;
CREATE TABLE `eventos_metas_periodos`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_grupo` int(11) NULL DEFAULT NULL,
  `calculo_start` datetime(0) NULL DEFAULT NULL,
  `calculo_end` datetime(0) NULL DEFAULT NULL,
  `calculo_status` int(11) NOT NULL,
  `valor_min` decimal(20, 4) NOT NULL,
  `valor_max` decimal(20, 4) NOT NULL,
  `premio_start` datetime(0) NULL DEFAULT NULL,
  `premio_end` datetime(0) NULL DEFAULT NULL,
  `premio_status` int(11) NOT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `exibir` int(11) NOT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eventos_metas_premios
-- ----------------------------
DROP TABLE IF EXISTS `eventos_metas_premios`;
CREATE TABLE `eventos_metas_premios`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_grupo` int(11) NULL DEFAULT NULL,
  `id_periodo` int(11) NULL DEFAULT NULL,
  `id_jogador` int(11) NULL DEFAULT NULL,
  `validade` datetime(0) NULL DEFAULT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `manual` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 50 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eventos_pagamentos
-- ----------------------------
DROP TABLE IF EXISTS `eventos_pagamentos`;
CREATE TABLE `eventos_pagamentos`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_evento` int(11) NOT NULL,
  `id_periodo` int(11) NULL DEFAULT NULL,
  `id_time` int(20) NULL DEFAULT NULL,
  `id_jog_transf` int(11) NULL DEFAULT NULL,
  `id_lancamento_transf` int(11) NULL DEFAULT NULL,
  `id_lancamento` int(11) NOT NULL,
  `id_jogador` int(11) NOT NULL,
  `id_forma_pgto` int(11) NOT NULL,
  `valor` decimal(20, 2) NOT NULL,
  `valor_taxa` decimal(20, 2) NOT NULL,
  `data_vencimento` datetime(0) NULL DEFAULT NULL,
  `documento` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `emissao_entrada` int(11) NOT NULL,
  `registro_individual` int(11) NOT NULL,
  `deposito_antecipado` int(11) NOT NULL,
  `id_usuario` int(11) NULL DEFAULT NULL,
  `id_caixa_user` int(11) NULL DEFAULT NULL,
  `data_hora` datetime(0) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_evento_index`(`id_evento`) USING BTREE,
  INDEX `id_periodo_index`(`id_periodo`) USING BTREE,
  INDEX `id_lancamento_index`(`id_lancamento`) USING BTREE,
  INDEX `id_jogador_index`(`id_jogador`) USING BTREE,
  INDEX `id_forma_pgto_index`(`id_forma_pgto`) USING BTREE,
  INDEX `id_usuario_index`(`id_usuario`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 849 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eventos_periodo_caixa
-- ----------------------------
DROP TABLE IF EXISTS `eventos_periodo_caixa`;
CREATE TABLE `eventos_periodo_caixa`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `horario_abertura` datetime(0) NOT NULL,
  `id_usuario_abertura` int(11) NOT NULL,
  `horario_fechamento` datetime(0) NULL DEFAULT NULL,
  `id_usuario_fechamento` int(11) NULL DEFAULT NULL,
  `id_evento` int(11) NOT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_evento_index`(`id_evento`) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 43 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eventos_premiacoes
-- ----------------------------
DROP TABLE IF EXISTS `eventos_premiacoes`;
CREATE TABLE `eventos_premiacoes`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_torneio` int(11) NULL DEFAULT NULL,
  `posicao` int(11) NULL DEFAULT NULL,
  `valor` decimal(20, 2) NULL DEFAULT NULL,
  `id_jogador` int(11) NULL DEFAULT NULL,
  `id_usuario_confirmado` int(11) NULL DEFAULT NULL,
  `posicao_paga` int(11) NULL DEFAULT NULL,
  `horario_confirmado` datetime(0) NULL DEFAULT NULL,
  `status` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_torneio_index`(`id_torneio`) USING BTREE,
  INDEX `posicao_index`(`posicao`) USING BTREE,
  INDEX `id_jogador_index`(`id_jogador`) USING BTREE,
  INDEX `posicao_paga_index`(`posicao_paga`) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eventos_retencao_ir
-- ----------------------------
DROP TABLE IF EXISTS `eventos_retencao_ir`;
CREATE TABLE `eventos_retencao_ir`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_evento` int(11) NULL DEFAULT NULL,
  `id_jogador` int(11) NULL DEFAULT NULL,
  `valor_base` decimal(10, 2) NULL DEFAULT NULL,
  `valor_retido` decimal(10, 2) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_evento_index`(`id_evento`) USING BTREE,
  INDEX `id_jogador_index`(`id_jogador`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 744 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eventos_saldo_utilizacao
-- ----------------------------
DROP TABLE IF EXISTS `eventos_saldo_utilizacao`;
CREATE TABLE `eventos_saldo_utilizacao`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_jogador` int(11) NOT NULL,
  `id_torneio` int(11) NOT NULL,
  `id_evento` int(11) NOT NULL,
  `id_periodo` int(11) NOT NULL,
  `id_caixa_user` int(11) NOT NULL,
  `id_forma_pgto` int(11) NOT NULL,
  `id_lancamento` int(11) NOT NULL,
  `valor` decimal(20, 2) NOT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `obs_imposto` decimal(20, 2) NULL DEFAULT NULL,
  `gameid_taxa` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 837 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eventos_times
-- ----------------------------
DROP TABLE IF EXISTS `eventos_times`;
CREATE TABLE `eventos_times`  (
  `id` int(20) NOT NULL AUTO_INCREMENT,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `descricao` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `id_jogador_resp` int(20) NULL DEFAULT NULL,
  `status` int(20) NOT NULL,
  `id_evento` int(20) NULL DEFAULT NULL,
  `id_conta` int(20) NULL DEFAULT NULL,
  `fechado` int(20) NOT NULL,
  `fechado_acerto` int(20) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE,
  INDEX `id_jogador_resp_index`(`id_jogador_resp`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 48 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eventos_times_jogadores
-- ----------------------------
DROP TABLE IF EXISTS `eventos_times_jogadores`;
CREATE TABLE `eventos_times_jogadores`  (
  `id` int(20) NOT NULL AUTO_INCREMENT,
  `id_time` int(20) NULL DEFAULT NULL,
  `id_jogador` int(20) NULL DEFAULT NULL,
  `limite` decimal(20, 2) NOT NULL,
  `saque` int(20) NOT NULL,
  `distribuir_premiacao` int(20) NOT NULL,
  `torneios` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `obs` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE,
  INDEX `id_time_index`(`id_time`) USING BTREE,
  INDEX `id_jogador_index`(`id_jogador`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 123 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eventos_transferencias
-- ----------------------------
DROP TABLE IF EXISTS `eventos_transferencias`;
CREATE TABLE `eventos_transferencias`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `horario` datetime(0) NULL DEFAULT NULL,
  `id_evento` int(11) NULL DEFAULT NULL,
  `id_periodo` int(11) NULL DEFAULT NULL,
  `id_lancamento` int(11) NULL DEFAULT NULL,
  `id_jogador` int(11) NULL DEFAULT NULL,
  `valor` decimal(20, 2) NULL DEFAULT NULL,
  `id_usuario` int(11) NULL DEFAULT NULL,
  `id_caixa_user` int(11) NULL DEFAULT NULL,
  `pix` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `banco_agencia` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `banco` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `banco_conta` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `banco_obs` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `realizado` int(11) NOT NULL,
  `realizado_data_hora` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_evento_index`(`id_evento`) USING BTREE,
  INDEX `id_periodo_index`(`id_periodo`) USING BTREE,
  INDEX `id_lancamento_index`(`id_lancamento`) USING BTREE,
  INDEX `id_jogador_index`(`id_jogador`) USING BTREE,
  INDEX `id_usuario_index`(`id_usuario`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 68 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eventos_usuarios_bloqueios
-- ----------------------------
DROP TABLE IF EXISTS `eventos_usuarios_bloqueios`;
CREATE TABLE `eventos_usuarios_bloqueios`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `id_evento` int(11) NULL DEFAULT NULL,
  `id_usuario` int(11) NULL DEFAULT NULL,
  `id_torneio` int(11) NULL DEFAULT NULL,
  `id_torneio_item` int(11) NULL DEFAULT NULL,
  `id_usuario_cadastro` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_evento_index`(`id_evento`) USING BTREE,
  INDEX `id_usuario_index`(`id_usuario`) USING BTREE,
  INDEX `id_torneio_index`(`id_torneio`) USING BTREE,
  INDEX `id_torneio_item_index`(`id_torneio_item`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eventos_usuarios_config
-- ----------------------------
DROP TABLE IF EXISTS `eventos_usuarios_config`;
CREATE TABLE `eventos_usuarios_config`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `id_evento` int(11) NULL DEFAULT NULL,
  `id_usuario` int(11) NULL DEFAULT NULL,
  `tela_niveis_ids_trn` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `tela_mesas_ids_trn` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_evento_index`(`id_evento`) USING BTREE,
  INDEX `id_usuario_index`(`id_usuario`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 24 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for financeiro_centros
-- ----------------------------
DROP TABLE IF EXISTS `financeiro_centros`;
CREATE TABLE `financeiro_centros`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `entrada` int(11) NULL DEFAULT NULL,
  `saida` int(11) NULL DEFAULT NULL,
  `caixa_geral` int(11) NULL DEFAULT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for financeiro_fornecedores
-- ----------------------------
DROP TABLE IF EXISTS `financeiro_fornecedores`;
CREATE TABLE `financeiro_fornecedores`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `endereco` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cidade` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `uf` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `tel1` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `tel2` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `contato` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `id_centro` int(11) NULL DEFAULT NULL,
  `obs` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `socio` int(11) NULL DEFAULT NULL,
  `cheque` int(11) NOT NULL,
  `fluxo` int(11) NOT NULL,
  `caixa_geral` int(11) NULL DEFAULT NULL,
  `status` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for financeiro_registros
-- ----------------------------
DROP TABLE IF EXISTS `financeiro_registros`;
CREATE TABLE `financeiro_registros`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_centro` int(11) NULL DEFAULT NULL,
  `id_fornecedor` int(11) NULL DEFAULT NULL,
  `data` date NULL DEFAULT NULL,
  `descricao` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `valor` decimal(20, 2) NULL DEFAULT NULL,
  `obs` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `acao` int(11) NULL DEFAULT NULL,
  `tipo_origem` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `id_origem` int(11) NULL DEFAULT NULL,
  `caixa_geral` int(11) NOT NULL,
  `id_usuario` int(11) NULL DEFAULT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for fingeral_categorias
-- ----------------------------
DROP TABLE IF EXISTS `fingeral_categorias`;
CREATE TABLE `fingeral_categorias`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `id_pai` int(11) NULL DEFAULT NULL,
  `sistema` int(11) NOT NULL,
  `ordem_sistema` int(11) NOT NULL,
  `fluxo` int(11) NOT NULL,
  `status` int(11) NOT NULL,
  `excluido` int(11) NOT NULL,
  `id_antigo` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_pai_index`(`id_pai`) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE,
  INDEX `excluido_index`(`excluido`) USING BTREE,
  INDEX `sistema_index`(`sistema`) USING BTREE,
  INDEX `ordem_sistema_index`(`ordem_sistema`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 14 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for fingeral_contas
-- ----------------------------
DROP TABLE IF EXISTS `fingeral_contas`;
CREATE TABLE `fingeral_contas`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `sigla` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `descricao` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `sistema` int(11) NOT NULL,
  `ordem_sistema` int(11) NOT NULL,
  `oculto` int(11) NOT NULL,
  `status` int(11) NOT NULL,
  `excluido` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE,
  INDEX `excluido_index`(`excluido`) USING BTREE,
  INDEX `sistema_index`(`sistema`) USING BTREE,
  INDEX `ordem_sistema_index`(`ordem_sistema`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for fingeral_formas_pgto
-- ----------------------------
DROP TABLE IF EXISTS `fingeral_formas_pgto`;
CREATE TABLE `fingeral_formas_pgto`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `sigla` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `id_conta` int(11) NOT NULL,
  `cash_status` int(11) NOT NULL,
  `cash_taxa` decimal(20, 2) NOT NULL,
  `cash_taxa_arredondar` int(11) NOT NULL,
  `cash_taxa_ajuste` int(11) NOT NULL,
  `torneio_status` int(11) NOT NULL,
  `torneio_taxa` decimal(20, 2) NOT NULL,
  `torneio_taxa_arredondar` int(11) NOT NULL,
  `torneio_taxa_ajuste` int(11) NOT NULL,
  `bar_status` int(11) NOT NULL,
  `bar_taxa` decimal(20, 2) NOT NULL,
  `bar_taxa_arredondar` int(11) NOT NULL,
  `bar_taxa_ajuste` int(11) NOT NULL,
  `evento_status` int(11) NOT NULL,
  `evento_taxa` decimal(20, 2) NOT NULL,
  `evento_taxa_arredondar` int(11) NOT NULL,
  `evento_taxa_ajuste` int(11) NOT NULL,
  `co_status` int(11) NOT NULL,
  `co_taxa` decimal(20, 2) NOT NULL,
  `co_taxa_arredondar` int(11) NOT NULL,
  `co_taxa_ajuste` int(11) NOT NULL,
  `registro_individual` int(11) NOT NULL,
  `status_pago` int(11) NOT NULL,
  `sistema` int(11) NOT NULL,
  `ordem_sistema` int(11) NOT NULL,
  `oculto_sistema` int(11) NOT NULL,
  `fingeral_bloquear` int(11) NOT NULL,
  `desconsiderar_compensacao` int(11) NOT NULL,
  `senha_liberar` int(11) NOT NULL,
  `exibir_default` int(11) NOT NULL,
  `excluido` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `cash_status_index`(`cash_status`) USING BTREE,
  INDEX `torneio_status_index`(`torneio_status`) USING BTREE,
  INDEX `bar_status_index`(`bar_status`) USING BTREE,
  INDEX `registro_individual_index`(`registro_individual`) USING BTREE,
  INDEX `sistema_index`(`sistema`) USING BTREE,
  INDEX `ordem_sistema_index`(`ordem_sistema`) USING BTREE,
  INDEX `oculto_sistema_index`(`oculto_sistema`) USING BTREE,
  INDEX `fingeral_bloquear_index`(`fingeral_bloquear`) USING BTREE,
  INDEX `excluido_index`(`excluido`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 46 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for fingeral_fornecedores
-- ----------------------------
DROP TABLE IF EXISTS `fingeral_fornecedores`;
CREATE TABLE `fingeral_fornecedores`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `endereco` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cidade` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `uf` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `tel1` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `tel2` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `contato` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `descricao` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `status` int(11) NOT NULL,
  `excluido` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE,
  INDEX `excluido_index`(`excluido`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for fingeral_registros
-- ----------------------------
DROP TABLE IF EXISTS `fingeral_registros`;
CREATE TABLE `fingeral_registros`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_categoria` int(11) NOT NULL,
  `id_forma_pgto` int(11) NOT NULL,
  `id_conta` int(11) NOT NULL,
  `id_fornecedor` int(11) NOT NULL,
  `id_cliente` int(11) NOT NULL,
  `descricao` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `documento` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `valor` decimal(20, 2) NOT NULL,
  `observacao` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `tipo_lancamento` int(11) NOT NULL,
  `data_lancamento` datetime(0) NOT NULL,
  `data_vencimento` datetime(0) NULL DEFAULT NULL,
  `data_pagamento` datetime(0) NULL DEFAULT NULL,
  `data_competencia` datetime(0) NOT NULL,
  `pagar_automatico` int(11) NOT NULL,
  `status_pago` int(11) NOT NULL,
  `sistema` int(11) NOT NULL,
  `registro_individual` int(11) NOT NULL,
  `caixa_geral` int(11) NOT NULL,
  `modulo` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `id_modulo` int(11) NOT NULL,
  `fingeral_bloquear` int(11) NOT NULL,
  `vinculo_id_pgto` int(11) NOT NULL,
  `id_usuario` int(11) NOT NULL,
  `status` int(11) NOT NULL,
  `excluido` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_categoria_index`(`id_categoria`) USING BTREE,
  INDEX `id_conta_index`(`id_conta`) USING BTREE,
  INDEX `id_fornecedor_index`(`id_fornecedor`) USING BTREE,
  INDEX `id_cliente_index`(`id_cliente`) USING BTREE,
  INDEX `data_lancamento_index`(`data_lancamento`) USING BTREE,
  INDEX `data_vencimento_index`(`data_vencimento`) USING BTREE,
  INDEX `data_pagamento_index`(`data_pagamento`) USING BTREE,
  INDEX `pagar_automatico_index`(`pagar_automatico`) USING BTREE,
  INDEX `status_pago_index`(`status_pago`) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE,
  INDEX `excluido_index`(`excluido`) USING BTREE,
  INDEX `id_forma_pgto_index`(`id_forma_pgto`) USING BTREE,
  INDEX `tipo_lancamento_index`(`tipo_lancamento`) USING BTREE,
  INDEX `sistema_index`(`sistema`) USING BTREE,
  INDEX `registro_individual_index`(`registro_individual`) USING BTREE,
  INDEX `caixa_geral_index`(`caixa_geral`) USING BTREE,
  INDEX `modulo_index`(`modulo`(10)) USING BTREE,
  INDEX `id_modulo_index`(`id_modulo`) USING BTREE,
  INDEX `fingeral_bloquear_index`(`fingeral_bloquear`) USING BTREE,
  INDEX `vinculo_id_pgto_index`(`vinculo_id_pgto`) USING BTREE,
  INDEX `id_usuario_index`(`id_usuario`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 121 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for galeria
-- ----------------------------
DROP TABLE IF EXISTS `galeria`;
CREATE TABLE `galeria`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `img` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `titulo` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `altura` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `largura` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `tamanho` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `tipo` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `tipo_index`(`tipo`(10)) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for gameid_config_formas_pgto
-- ----------------------------
DROP TABLE IF EXISTS `gameid_config_formas_pgto`;
CREATE TABLE `gameid_config_formas_pgto`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_forma_pgto` int(11) NOT NULL,
  `ev_liberado` int(11) NOT NULL,
  `clube_liberado` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for gameid_qrcodes
-- ----------------------------
DROP TABLE IF EXISTS `gameid_qrcodes`;
CREATE TABLE `gameid_qrcodes`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `qrcode_full` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `qrcode_code` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `nome` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `descricao` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `vinculo_usuario_id` int(11) NULL DEFAULT NULL,
  `automatico` int(11) NOT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for gameid_vendas
-- ----------------------------
DROP TABLE IF EXISTS `gameid_vendas`;
CREATE TABLE `gameid_vendas`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_torneio` int(11) NOT NULL,
  `id_jogador` int(11) NOT NULL,
  `id_etapa` int(11) NOT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `finalizado` int(11) NOT NULL,
  `finalizado_data_hora` datetime(0) NULL DEFAULT NULL,
  `cancelado` int(11) NOT NULL,
  `cancelado_data_hora` datetime(0) NULL DEFAULT NULL,
  `excluido` int(11) NOT NULL,
  `excluido_data_hora` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 545 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for gameid_vendas_itens
-- ----------------------------
DROP TABLE IF EXISTS `gameid_vendas_itens`;
CREATE TABLE `gameid_vendas_itens`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_torneio` int(11) NOT NULL,
  `id_jogador` int(11) NOT NULL,
  `id_etapa` int(11) NOT NULL,
  `id_venda` int(11) NOT NULL,
  `id_item` int(11) NOT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `finalizado` int(11) NOT NULL,
  `finalizado_data_hora` datetime(0) NULL DEFAULT NULL,
  `cancelado` int(11) NOT NULL,
  `cancelado_data_hora` datetime(0) NULL DEFAULT NULL,
  `excluido` int(11) NOT NULL,
  `excluido_data_hora` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 666 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for gameid_vendas_pagamentos
-- ----------------------------
DROP TABLE IF EXISTS `gameid_vendas_pagamentos`;
CREATE TABLE `gameid_vendas_pagamentos`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_torneio` int(11) NOT NULL,
  `id_jogador` int(11) NOT NULL,
  `id_etapa` int(11) NOT NULL,
  `id_venda` int(11) NOT NULL,
  `id_forma_pgto` int(11) NOT NULL,
  `id_ref` int(11) NOT NULL,
  `valor` decimal(20, 4) NOT NULL,
  `valor_taxa_gid` decimal(20, 4) NOT NULL,
  `valor_taxa_clube` decimal(20, 4) NOT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `reservado` int(11) NOT NULL,
  `reservado_data_hora` datetime(0) NULL DEFAULT NULL,
  `finalizado` int(11) NOT NULL,
  `finalizado_data_hora` datetime(0) NULL DEFAULT NULL,
  `cancelado` int(11) NULL DEFAULT NULL,
  `cancelado_data_hora` datetime(0) NULL DEFAULT NULL,
  `excluido` int(11) NOT NULL,
  `excluido_data_hora` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 988 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for gameid_vinculos
-- ----------------------------
DROP TABLE IF EXISTS `gameid_vinculos`;
CREATE TABLE `gameid_vinculos`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `GID_id_jogador` int(11) NOT NULL,
  `GID_gameid` int(11) NOT NULL,
  `GID_dados` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `finalizado` int(11) NOT NULL,
  `finalizado_data_hora` datetime(0) NULL DEFAULT NULL,
  `finalizado_usuario_id` int(11) NULL DEFAULT NULL,
  `cancelado` int(11) NOT NULL,
  `cancelado_data_hora` datetime(0) NULL DEFAULT NULL,
  `cancelado_usuario_id` int(11) NULL DEFAULT NULL,
  `bloqueado` int(11) NOT NULL,
  `bloqueado_data_hora` datetime(0) NULL DEFAULT NULL,
  `bloqueado_usuario_id` int(11) NULL DEFAULT NULL,
  `recusa_motivo_id` int(11) NOT NULL,
  `recusa_observacao` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for jackpot
-- ----------------------------
DROP TABLE IF EXISTS `jackpot`;
CREATE TABLE `jackpot`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `data_abertura` date NULL DEFAULT NULL,
  `id_usuario_abertura` int(11) NULL DEFAULT NULL,
  `data_fechamento` date NULL DEFAULT NULL,
  `id_usuario_fechamento` int(11) NULL DEFAULT NULL,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `capagem` decimal(20, 4) NOT NULL,
  `status` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `data_abertura_index`(`data_abertura`) USING BTREE,
  INDEX `data_fechamento_index`(`data_fechamento`) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for jackpot_registros
-- ----------------------------
DROP TABLE IF EXISTS `jackpot_registros`;
CREATE TABLE `jackpot_registros`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_jackpot` int(11) NULL DEFAULT NULL,
  `data` datetime(0) NULL DEFAULT NULL,
  `tipo` int(11) NULL DEFAULT NULL,
  `valor` decimal(20, 2) NULL DEFAULT NULL,
  `valor_capagem` decimal(20, 2) NULL DEFAULT NULL,
  `tipo_origem` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `id_origem` int(11) NULL DEFAULT NULL,
  `id_jogador` int(11) NULL DEFAULT NULL,
  `mao_ganhadora` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `id_forma_pgto` int(11) NOT NULL,
  `id_usuario` int(11) NOT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_jackpot_index`(`id_jackpot`) USING BTREE,
  INDEX `data_index`(`data`) USING BTREE,
  INDEX `tipo_origem_index`(`tipo_origem`(10)) USING BTREE,
  INDEX `id_origem_index`(`id_origem`) USING BTREE,
  INDEX `id_jogador_index`(`id_jogador`) USING BTREE,
  INDEX `id_forma_pgto_index`(`id_forma_pgto`) USING BTREE,
  INDEX `id_usuario_index`(`id_usuario`) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 22 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for jogadores_estatisticas
-- ----------------------------
DROP TABLE IF EXISTS `jogadores_estatisticas`;
CREATE TABLE `jogadores_estatisticas`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_jogador` int(11) NULL DEFAULT NULL,
  `login` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `senha` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `codigo` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `acesso_estatisticas` int(11) NULL DEFAULT NULL,
  `acesso_pothora` int(11) NULL DEFAULT NULL,
  `acesso_ranking` int(11) NULL DEFAULT NULL,
  `acesso_vagas` int(11) NULL DEFAULT NULL,
  `acesso_ficha` int(11) NULL DEFAULT NULL,
  `status` int(11) NULL DEFAULT NULL,
  `nivel` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_jogador_index`(`id_jogador`) USING BTREE,
  INDEX `login_index`(`login`(10)) USING BTREE,
  INDEX `senha_index`(`senha`(10)) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for ranking
-- ----------------------------
DROP TABLE IF EXISTS `ranking`;
CREATE TABLE `ranking`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `data_abertura` date NULL DEFAULT NULL,
  `id_usuario_abertura` int(11) NULL DEFAULT NULL,
  `data_fechamento` date NULL DEFAULT NULL,
  `id_usuario_fechamento` int(11) NULL DEFAULT NULL,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `qtd_pontuacao` int(11) NULL DEFAULT NULL,
  `qtd_premiacao` int(11) NULL DEFAULT NULL,
  `valor_meta` decimal(20, 2) NULL DEFAULT NULL,
  `valor_atingido` decimal(20, 2) NULL DEFAULT NULL,
  `ordem_tipo` int(11) NOT NULL,
  `descricao` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `id_grupo_vagas` int(11) NULL DEFAULT NULL,
  `tipo` int(11) NOT NULL,
  `pontuar_todos` int(11) NOT NULL,
  `formula` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `formula_cond1` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `formula_valid` int(11) NULL DEFAULT NULL,
  `formula_cond2` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `formula_cond3` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `gameid` int(11) NOT NULL,
  `online` int(11) NOT NULL,
  `status` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `data_abertura_index`(`data_abertura`) USING BTREE,
  INDEX `online_index`(`online`) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 25 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for ranking_classificacao
-- ----------------------------
DROP TABLE IF EXISTS `ranking_classificacao`;
CREATE TABLE `ranking_classificacao`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_ranking` int(11) NULL DEFAULT NULL,
  `id_pontuacao` int(11) NULL DEFAULT NULL,
  `id_jogador` int(11) NULL DEFAULT NULL,
  `id_etapa` int(11) NULL DEFAULT NULL,
  `posicao_torneio` int(11) NULL DEFAULT NULL,
  `pts_torneio` decimal(20, 2) NULL DEFAULT NULL,
  `data_lancamento` date NOT NULL,
  `inf_extras` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_ranking_index`(`id_ranking`) USING BTREE,
  INDEX `id_pontuacao_index`(`id_pontuacao`) USING BTREE,
  INDEX `id_jogador_index`(`id_jogador`) USING BTREE,
  INDEX `id_etapa_index`(`id_etapa`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1125 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for ranking_etapas
-- ----------------------------
DROP TABLE IF EXISTS `ranking_etapas`;
CREATE TABLE `ranking_etapas`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_ranking` int(11) NULL DEFAULT NULL,
  `etapa` int(11) NULL DEFAULT NULL,
  `nome` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `data` date NULL DEFAULT NULL,
  `id_campeao` int(11) NULL DEFAULT NULL,
  `usuario` int(11) NULL DEFAULT NULL,
  `valor` decimal(20, 2) NULL DEFAULT NULL,
  `torneio` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `id_torneio` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_ranking_index`(`id_ranking`) USING BTREE,
  INDEX `id_torneio_index`(`id_torneio`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 34 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for ranking_mesclados
-- ----------------------------
DROP TABLE IF EXISTS `ranking_mesclados`;
CREATE TABLE `ranking_mesclados`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_ranking` int(11) NULL DEFAULT NULL,
  `id_ranking_mesclado` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_ranking_index`(`id_ranking`) USING BTREE,
  INDEX `id_ranking_mesclado_index`(`id_ranking_mesclado`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for ranking_pontuacao
-- ----------------------------
DROP TABLE IF EXISTS `ranking_pontuacao`;
CREATE TABLE `ranking_pontuacao`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_ranking` int(11) NULL DEFAULT NULL,
  `nivel` int(11) NOT NULL,
  `posicao` int(11) NULL DEFAULT NULL,
  `pontos` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_ranking_index`(`id_ranking`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 23271 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for ranking_premiacao
-- ----------------------------
DROP TABLE IF EXISTS `ranking_premiacao`;
CREATE TABLE `ranking_premiacao`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_ranking` int(11) NULL DEFAULT NULL,
  `posicao` int(11) NULL DEFAULT NULL,
  `qtd` int(11) NULL DEFAULT NULL,
  `premio` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_ranking_index`(`id_ranking`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 19 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for ranking_temp
-- ----------------------------
DROP TABLE IF EXISTS `ranking_temp`;
CREATE TABLE `ranking_temp`  (
  `doc` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `id_jogador` int(11) NULL DEFAULT NULL,
  `jogador` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `torneio` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `posicao` int(11) NULL DEFAULT NULL,
  `entradas` int(11) NULL DEFAULT NULL,
  `pontos` decimal(20, 2) NULL DEFAULT NULL,
  `omaha` int(1) NOT NULL,
  `mixed` int(1) NOT NULL
) ENGINE = MyISAM CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for rep_agenda_torneios
-- ----------------------------
DROP TABLE IF EXISTS `rep_agenda_torneios`;
CREATE TABLE `rep_agenda_torneios`  (
  `code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 't_clubeid_torneioid',
  `clube_id` int(11) NULL DEFAULT NULL,
  `evento_id` int(11) NULL DEFAULT NULL,
  `torneio_id` int(11) NOT NULL,
  `nome` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `painel` int(1) NOT NULL,
  `painel_id` int(11) NULL DEFAULT NULL,
  `data_hora_cadastro` datetime(0) NULL DEFAULT NULL,
  `data_hora_inicio` datetime(0) NULL DEFAULT NULL,
  `destaque` int(1) NOT NULL,
  `destaque_img_url` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `liberado` int(1) NOT NULL,
  `finalizado` int(1) NOT NULL,
  `update_run` int(1) NOT NULL,
  `update_data_hora` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`code`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for rep_clubes_config
-- ----------------------------
DROP TABLE IF EXISTS `rep_clubes_config`;
CREATE TABLE `rep_clubes_config`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `fncr_id_clube` int(11) NULL DEFAULT NULL,
  `moeda_virtual_taxa_individual` int(1) NOT NULL,
  `moeda_virtual_taxa_clube_jogador` decimal(20, 4) NOT NULL,
  `moeda_virtual_taxa_jogador_clube` decimal(20, 4) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `fncr_id_clube_index`(`fncr_id_clube`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for rep_moedas_virtuais
-- ----------------------------
DROP TABLE IF EXISTS `rep_moedas_virtuais`;
CREATE TABLE `rep_moedas_virtuais`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `registro_tipo` int(1) NULL DEFAULT NULL COMMENT '1 - Representante / 2 - Clube / 3 - Jogador',
  `registro_id` int(11) NULL DEFAULT NULL,
  `origem_tipo` int(1) NULL DEFAULT NULL COMMENT '1 - Representante / 2 - Clube / 3 - Jogador',
  `origem_id` int(11) NULL DEFAULT NULL,
  `destino_tipo` int(1) NULL DEFAULT NULL COMMENT '1 - Representante / 2 - Clube / 3 - Jogador',
  `destino_id` int(11) NULL DEFAULT NULL,
  `valor` decimal(20, 4) NULL DEFAULT NULL,
  `taxa_perc` decimal(20, 4) NULL DEFAULT NULL,
  `taxa_valor` decimal(20, 4) NULL DEFAULT NULL,
  `saldo` decimal(20, 4) NULL DEFAULT NULL,
  `id_ref` int(11) NULL DEFAULT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `usuario` int(11) NULL DEFAULT NULL,
  `excluido` int(1) NOT NULL,
  `excluido_usuario` int(11) NULL DEFAULT NULL,
  `excluido_data_hora` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `registro_tipo_index`(`registro_tipo`) USING BTREE,
  INDEX `registro_id_index`(`registro_id`) USING BTREE,
  INDEX `origem_tipo_index`(`origem_tipo`) USING BTREE,
  INDEX `origem_id_index`(`origem_id`) USING BTREE,
  INDEX `destino_tipo_index`(`destino_tipo`) USING BTREE,
  INDEX `destino_id_index`(`destino_id`) USING BTREE,
  INDEX `id_ref_index`(`id_ref`) USING BTREE,
  INDEX `excluido_index`(`excluido`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 159 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for rep_tickets_nacionais_grupos
-- ----------------------------
DROP TABLE IF EXISTS `rep_tickets_nacionais_grupos`;
CREATE TABLE `rep_tickets_nacionais_grupos`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `clube_id` int(11) NULL DEFAULT NULL,
  `torneio_id` int(11) NULL DEFAULT NULL,
  `torneio_nome` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `torneio_data` datetime(0) NULL DEFAULT NULL,
  `tickets_valor` decimal(20, 4) NOT NULL,
  `tickets_qtd` int(11) NOT NULL,
  `tickets_transferivel` int(11) NOT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `iniciado` int(11) NOT NULL,
  `emitir` int(11) NOT NULL,
  `utilizar` int(11) NOT NULL,
  `fechado` int(11) NOT NULL,
  `excluido` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `clube_id_index`(`clube_id`) USING BTREE,
  INDEX `emitir_index`(`emitir`) USING BTREE,
  INDEX `utilizar_index`(`utilizar`) USING BTREE,
  INDEX `fechado_index`(`fechado`) USING BTREE,
  INDEX `excluido_index`(`excluido`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for rep_tickets_nacionais_registros
-- ----------------------------
DROP TABLE IF EXISTS `rep_tickets_nacionais_registros`;
CREATE TABLE `rep_tickets_nacionais_registros`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `grupo_id` int(11) NULL DEFAULT NULL,
  `clube_id` int(11) NULL DEFAULT NULL,
  `jogador_id` int(11) NULL DEFAULT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `registrado_data_hora` datetime(0) NULL DEFAULT NULL,
  `registrado_torneio_id` int(11) NULL DEFAULT NULL,
  `registrado_torneio_nome` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `utilizado` int(11) NOT NULL,
  `utilizado_data_hora` datetime(0) NULL DEFAULT NULL,
  `utilizado_id_grupo_local` int(11) NULL DEFAULT NULL,
  `utilizado_id_ticket_local` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `grupo_id_index`(`grupo_id`) USING BTREE,
  INDEX `clube_id_index`(`clube_id`) USING BTREE,
  INDEX `jogador_id_index`(`jogador_id`) USING BTREE,
  INDEX `utilizado_index`(`utilizado`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 15 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for torneio_historico
-- ----------------------------
DROP TABLE IF EXISTS `torneio_historico`;
CREATE TABLE `torneio_historico`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_torneio` int(11) NULL DEFAULT NULL,
  `horario` time(0) NULL DEFAULT NULL,
  `registro` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `descricao` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `usuario` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `mostrar` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_torneio_index`(`id_torneio`) USING BTREE,
  INDEX `mostrar_index`(`mostrar`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for torneios
-- ----------------------------
DROP TABLE IF EXISTS `torneios`;
CREATE TABLE `torneios`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `evento_data` date NULL DEFAULT NULL,
  `evento_hora` time(0) NULL DEFAULT NULL,
  `id_evento` int(11) NOT NULL,
  `evento_caixa` int(11) NOT NULL,
  `evento_caixa_gameid` int(11) NOT NULL,
  `evento_cod` int(11) NULL DEFAULT NULL,
  `evento_premiacao` int(11) NOT NULL,
  `evento_premiacao_config` int(11) NOT NULL,
  `evento_mesa_blinds` int(11) NOT NULL,
  `venda_alternate` int(11) NOT NULL,
  `clube_gameid_vendas` int(11) NOT NULL DEFAULT 1,
  `data_hora_abertura` datetime(0) NULL DEFAULT NULL,
  `data_hora_fechamento` datetime(0) NULL DEFAULT NULL,
  `data_hora_auditoria` datetime(0) NULL DEFAULT NULL,
  `data_abertura` date NULL DEFAULT NULL,
  `hora_abertura` time(0) NULL DEFAULT NULL,
  `id_usuario_abertura` int(11) NULL DEFAULT NULL,
  `data_fechamento` date NULL DEFAULT NULL,
  `hora_fechamento` time(0) NULL DEFAULT NULL,
  `id_usuario_fechamento` int(11) NULL DEFAULT NULL,
  `data_auditoria` date NULL DEFAULT NULL,
  `hora_auditoria` time(0) NULL DEFAULT NULL,
  `id_usuario_auditoria` int(11) NULL DEFAULT NULL,
  `dinheiro` decimal(20, 2) NULL DEFAULT NULL,
  `cartao` decimal(20, 2) NULL DEFAULT NULL,
  `cartao_cred` decimal(20, 2) NOT NULL,
  `cartao_taxa_deb` decimal(20, 2) NOT NULL,
  `cartao_taxa_cred` decimal(20, 2) NOT NULL,
  `cheque` decimal(20, 2) NOT NULL,
  `rake` decimal(20, 2) NULL DEFAULT NULL,
  `taxa` decimal(20, 2) NOT NULL,
  `premiacao_pg` decimal(20, 2) NULL DEFAULT NULL,
  `premiacao_aut` decimal(20, 2) NOT NULL,
  `jackpot_pg` decimal(20, 2) NULL DEFAULT NULL,
  `ranking` decimal(20, 2) NULL DEFAULT NULL,
  `vagas` decimal(20, 2) NULL DEFAULT NULL,
  `vagas_usadas` decimal(20, 2) NULL DEFAULT NULL,
  `qtd_vagas_usadas` int(11) NULL DEFAULT NULL,
  `saida` decimal(20, 2) NULL DEFAULT NULL,
  `entrada` decimal(20, 2) NULL DEFAULT NULL,
  `valores_torneio` decimal(20, 2) NULL DEFAULT NULL,
  `pendencias_clientes` decimal(20, 2) NULL DEFAULT NULL,
  `outros_debitos` decimal(20, 2) NULL DEFAULT NULL,
  `outros_creditos` decimal(20, 2) NULL DEFAULT NULL,
  `cortesias` decimal(20, 2) NULL DEFAULT NULL,
  `conferencia_caixa` decimal(20, 2) NULL DEFAULT NULL,
  `chipcount` int(11) NULL DEFAULT NULL,
  `inscritos_ajuste` int(11) NOT NULL,
  `restantes_ajuste` int(11) NOT NULL,
  `obs_fechamento` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `obs_auditoria` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `id_vagas_usadas` int(11) NULL DEFAULT NULL,
  `id_ranking` int(11) NULL DEFAULT NULL,
  `iniciado` int(11) NULL DEFAULT NULL,
  `horadeinicio` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `layout_pot` decimal(20, 2) NULL DEFAULT NULL,
  `torneio_classificatorio` int(11) NOT NULL,
  `id_torneio_final` int(11) NULL DEFAULT NULL,
  `id_ref_estrutura` int(11) NULL DEFAULT NULL,
  `id_ref_blinds` int(11) NULL DEFAULT NULL,
  `sit` int(11) NOT NULL,
  `sit_code` int(11) NULL DEFAULT NULL,
  `sit_id_ref_estrutura` int(11) NOT NULL,
  `sit_max_jogs` int(11) NOT NULL,
  `sit_status` int(11) NOT NULL,
  `bounty` int(11) NOT NULL,
  `bounty_valor` decimal(20, 4) NOT NULL,
  `bounty_percent_progressive_ko` decimal(20, 4) NOT NULL,
  `insc_mult_bloq` int(11) NULL DEFAULT NULL,
  `insc_novos_jogadores` int(11) NULL DEFAULT NULL,
  `insc_sexos_ids` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `insc_metas_ids` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `insc_idade_min` int(11) NULL DEFAULT NULL,
  `prem_mult_liberar` int(11) NULL DEFAULT NULL,
  `hand_for_hand` int(11) NOT NULL,
  `action_clock` int(11) NOT NULL,
  `action_clock_init` int(11) NOT NULL,
  `action_clock_tb_tempo` int(11) NOT NULL,
  `action_clock_tb_max` int(11) NOT NULL,
  `ir_disable` int(11) NOT NULL,
  `status` int(11) NULL DEFAULT NULL,
  `liberado` int(11) NOT NULL,
  `excluido` int(11) NOT NULL,
  `ti` int(11) NOT NULL,
  `tb` int(11) NOT NULL,
  `vb` int(11) NOT NULL,
  `tr` int(11) NOT NULL,
  `vr` int(11) NOT NULL,
  `pt` decimal(20, 2) NOT NULL,
  `ptall` int(11) NOT NULL,
  `rk_valor_etapa` decimal(20, 2) NOT NULL,
  `rk_itm` int(11) NOT NULL,
  `rk_itm_qtd` int(11) NOT NULL,
  `rk_itm_pts` int(11) NOT NULL,
  `rk_nivel` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `evento_data_index`(`evento_data`) USING BTREE,
  INDEX `evento_hora_index`(`evento_hora`) USING BTREE,
  INDEX `id_evento_index`(`id_evento`) USING BTREE,
  INDEX `evento_caixa_index`(`evento_caixa`) USING BTREE,
  INDEX `evento_cod_index`(`evento_cod`) USING BTREE,
  INDEX `evento_premiacao_index`(`evento_premiacao`) USING BTREE,
  INDEX `data_hora_abertura_index`(`data_hora_abertura`) USING BTREE,
  INDEX `data_hora_fechamento_index`(`data_hora_fechamento`) USING BTREE,
  INDEX `torneio_classificatorio_index`(`torneio_classificatorio`) USING BTREE,
  INDEX `id_torneio_final_index`(`id_torneio_final`) USING BTREE,
  INDEX `id_ref_estrutura_index`(`id_ref_estrutura`) USING BTREE,
  INDEX `id_ref_blinds_index`(`id_ref_blinds`) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE,
  INDEX `excluido_index`(`excluido`) USING BTREE,
  INDEX `liberado_index`(`liberado`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 380 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for torneios_alternates
-- ----------------------------
DROP TABLE IF EXISTS `torneios_alternates`;
CREATE TABLE `torneios_alternates`  (
  `id` int(20) NOT NULL AUTO_INCREMENT,
  `id_torneio` int(20) NULL DEFAULT NULL,
  `id_jogador` int(20) NULL DEFAULT NULL,
  `id_venda` int(20) NULL DEFAULT NULL,
  `mesa` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `posicao` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `ordem` int(20) NULL DEFAULT NULL,
  `status` int(20) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_torneio_index`(`id_torneio`) USING BTREE,
  INDEX `id_jogador_index`(`id_jogador`) USING BTREE,
  INDEX `id_venda_index`(`id_venda`) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 497 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for torneios_blinds_grupos
-- ----------------------------
DROP TABLE IF EXISTS `torneios_blinds_grupos`;
CREATE TABLE `torneios_blinds_grupos`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for torneios_blinds_niveis
-- ----------------------------
DROP TABLE IF EXISTS `torneios_blinds_niveis`;
CREATE TABLE `torneios_blinds_niveis`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_blind` int(11) NULL DEFAULT NULL,
  `nivel` int(11) NULL DEFAULT NULL,
  `tempo` int(11) NULL DEFAULT NULL,
  `small` int(11) NULL DEFAULT NULL,
  `big` int(11) NULL DEFAULT NULL,
  `ante` int(11) NULL DEFAULT NULL,
  `break` int(11) NULL DEFAULT NULL,
  `link_youtube` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `break_apos` int(11) NULL DEFAULT NULL,
  `late_register` int(11) NOT NULL,
  `ativo` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_blind_index`(`id_blind`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 291 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for torneios_blinds_tvs
-- ----------------------------
DROP TABLE IF EXISTS `torneios_blinds_tvs`;
CREATE TABLE `torneios_blinds_tvs`  (
  `id` int(20) NOT NULL AUTO_INCREMENT,
  `code_tv` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 79 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for torneios_chipcount
-- ----------------------------
DROP TABLE IF EXISTS `torneios_chipcount`;
CREATE TABLE `torneios_chipcount`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_painel` int(11) NULL DEFAULT NULL,
  `id_torneio` int(11) NULL DEFAULT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `status` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 31 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed;

-- ----------------------------
-- Table structure for torneios_chipcount_registros
-- ----------------------------
DROP TABLE IF EXISTS `torneios_chipcount_registros`;
CREATE TABLE `torneios_chipcount_registros`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_chipcount` int(11) NULL DEFAULT NULL,
  `id_jogador` int(11) NULL DEFAULT NULL,
  `qtd_fichas` int(30) NULL DEFAULT NULL,
  `id_mesa` int(11) NULL DEFAULT NULL,
  `mesa_text` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `id_posicao` int(11) NULL DEFAULT NULL,
  `posicao_text` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `id_usuario` int(11) NULL DEFAULT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 46 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for torneios_config
-- ----------------------------
DROP TABLE IF EXISTS `torneios_config`;
CREATE TABLE `torneios_config`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_torneio` int(11) NULL DEFAULT NULL,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `valor` decimal(20, 2) NULL DEFAULT NULL,
  `rake` decimal(20, 2) NOT NULL,
  `taxa` decimal(20, 2) NOT NULL,
  `fichas` int(20) NULL DEFAULT NULL,
  `limite` int(11) NOT NULL,
  `siglas` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `ajuste` int(11) NOT NULL,
  `ajuste_fin` int(11) NOT NULL,
  `qtd_vendido_class` int(11) NOT NULL,
  `quantidade` int(11) NULL DEFAULT NULL,
  `id_t_final` int(11) NULL DEFAULT NULL,
  `id_ref_item` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `visivel_blinds` int(11) NULL DEFAULT NULL,
  `total_inscritos_add` int(11) NOT NULL,
  `direito_img` int(11) NOT NULL,
  `reposicionar_jog` int(11) NOT NULL,
  `bounty` int(11) NOT NULL,
  `pts_ranking` decimal(20, 2) NOT NULL,
  `imp_ticket` int(11) NOT NULL,
  `gameid_bloqueio` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_torneio_index`(`id_torneio`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 620 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for torneios_config_taxas
-- ----------------------------
DROP TABLE IF EXISTS `torneios_config_taxas`;
CREATE TABLE `torneios_config_taxas`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_torneio` int(11) NULL DEFAULT NULL,
  `id_item` int(11) NULL DEFAULT NULL,
  `nome` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `valor` decimal(20, 2) NOT NULL,
  `id_t_final` int(11) NULL DEFAULT NULL,
  `id_ref_taxa` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 520 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for torneios_contagem
-- ----------------------------
DROP TABLE IF EXISTS `torneios_contagem`;
CREATE TABLE `torneios_contagem`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_torneio` int(11) NULL DEFAULT NULL,
  `data_hora_abertura` datetime(0) NULL DEFAULT NULL,
  `compra` int(11) NOT NULL,
  `compra_qtd` int(11) NOT NULL,
  `tipo` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_torneio_index`(`id_torneio`) USING BTREE,
  INDEX `data_hora_abertura_index`(`data_hora_abertura`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 287 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for torneios_estruturas
-- ----------------------------
DROP TABLE IF EXISTS `torneios_estruturas`;
CREATE TABLE `torneios_estruturas`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `bounty_valor` decimal(20, 4) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 25 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for torneios_estruturas_itens
-- ----------------------------
DROP TABLE IF EXISTS `torneios_estruturas_itens`;
CREATE TABLE `torneios_estruturas_itens`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_estrutura` int(11) NULL DEFAULT NULL,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `valor` decimal(20, 2) NULL DEFAULT NULL,
  `rake` decimal(20, 2) NOT NULL,
  `taxa` decimal(20, 2) NOT NULL,
  `fichas` int(20) NULL DEFAULT NULL,
  `limite` int(11) NOT NULL,
  `siglas` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `reposicionar_jog` int(11) NOT NULL,
  `bounty` int(11) NOT NULL,
  `pts_ranking` decimal(20, 2) NOT NULL,
  `direito_img` int(11) NOT NULL,
  `gameid_bloqueio` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_estrutura_index`(`id_estrutura`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 44 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for torneios_estruturas_itens_taxas
-- ----------------------------
DROP TABLE IF EXISTS `torneios_estruturas_itens_taxas`;
CREATE TABLE `torneios_estruturas_itens_taxas`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_estrutura` int(11) NULL DEFAULT NULL,
  `id_estrutura_item` int(11) NULL DEFAULT NULL,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `valor` decimal(20, 2) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 85 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for torneios_inf_ticket
-- ----------------------------
DROP TABLE IF EXISTS `torneios_inf_ticket`;
CREATE TABLE `torneios_inf_ticket`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_torneio` int(11) NULL DEFAULT NULL,
  `torneio1` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `torneio2` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `sub1` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `sub2` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `titulo` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_torneio_index`(`id_torneio`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 329 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for torneios_layout
-- ----------------------------
DROP TABLE IF EXISTS `torneios_layout`;
CREATE TABLE `torneios_layout`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_torneio` int(11) NULL DEFAULT NULL,
  `titulo_texto` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `titulo_size` int(11) NULL DEFAULT NULL,
  `titulo_cor` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `titulo_fundo` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cor_titulos` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cor_relogio` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cor_campos` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cor_valores` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cor_geral_fundo` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cor_geral_fundo_img` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cor_topo_fundo` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cor_topo_fundo_img` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cor_topo_texto` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cor_inf_fundo` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cor_inf_texto` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cor_principal_nivel` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cor_principal_relogio` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cor_principal_titulos` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cor_principal_valores` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cor_principal_blinds` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cor_principal_ante` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cor_principal_proximo` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cor_itens_fundo` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cor_itens_titulo` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cor_itens_valor` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cor_pot_fundo` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cor_pot_titulo` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cor_pot_valor` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cor_premiacao_fundo` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cor_premiacao_titulo` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cor_premiacao_valor` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `zoom_topo_texto` decimal(20, 2) NOT NULL,
  `zoom_inf_texto` decimal(20, 2) NOT NULL,
  `zoom_principal_nivel` decimal(20, 2) NOT NULL,
  `zoom_principal_relogio` decimal(20, 2) NOT NULL,
  `zoom_principal_titulos` decimal(20, 2) NOT NULL,
  `zoom_principal_valores` decimal(20, 2) NOT NULL,
  `zoom_principal_blinds` decimal(20, 2) NOT NULL,
  `zoom_principal_ante` decimal(20, 2) NOT NULL,
  `zoom_principal_proximo` decimal(20, 2) NOT NULL,
  `zoom_itens_titulo` decimal(20, 2) NOT NULL,
  `zoom_itens_valor` decimal(20, 2) NOT NULL,
  `zoom_pot_titulo` decimal(20, 2) NOT NULL,
  `zoom_pot_valor` decimal(20, 2) NOT NULL,
  `zoom_premiacao_titulo` decimal(20, 2) NOT NULL,
  `zoom_premiacao_valor` decimal(20, 2) NOT NULL,
  `slide_imgs` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `titulo_img_compac` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `titulo_img_compac_visivel` int(11) NULL DEFAULT NULL,
  `titulo_img_normal` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `titulo_img_normal_visivel` int(11) NULL DEFAULT NULL,
  `titulo_visivel` int(11) NULL DEFAULT NULL,
  `inf_visivel` int(11) NULL DEFAULT NULL,
  `inf_valor` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `chip_visivel` int(11) NULL DEFAULT NULL,
  `chip_valor` int(11) NULL DEFAULT NULL,
  `chip_calculo` int(11) NOT NULL,
  `chip_unitario` int(40) NOT NULL,
  `ante_visivel` int(11) NULL DEFAULT NULL,
  `ante_tipo` int(11) NOT NULL,
  `pot_visivel` int(11) NULL DEFAULT NULL,
  `pot_automatico` int(11) NOT NULL,
  `pot_garantido` decimal(20, 2) NOT NULL,
  `prizes_visivel` int(11) NULL DEFAULT NULL,
  `prizes_rolagem` int(11) NULL DEFAULT NULL,
  `prizes_size` int(11) NULL DEFAULT NULL,
  `itens_visivel` int(11) NULL DEFAULT NULL,
  `eliminacoes_visivel` int(11) NULL DEFAULT NULL,
  `som_alerta` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `som_final` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `youtube_visivel` int(11) NULL DEFAULT NULL,
  `youtube_link` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `config_utilizaritens` int(11) NOT NULL,
  `config_sentarjog` int(11) NOT NULL,
  `config_imprimirutilizados` int(11) NOT NULL,
  `config_imprimirdireto` int(11) NOT NULL,
  `ticket_direitoimg` int(11) NOT NULL,
  `vendas_moeda_virtual` int(11) NOT NULL,
  `pot_total` decimal(10, 0) NULL DEFAULT NULL,
  `tempo_salvo` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `tempo_intervalo` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `barra_blind` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `hora_inicio` datetime(0) NULL DEFAULT NULL,
  `config_posicionamento` int(11) NOT NULL,
  `num_alternate` int(11) NOT NULL,
  `restantes_add_automatico` int(11) NOT NULL,
  `inscritos_total_vendas` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_torneio_index`(`id_torneio`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 348 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for torneios_mesas
-- ----------------------------
DROP TABLE IF EXISTS `torneios_mesas`;
CREATE TABLE `torneios_mesas`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_torneio` int(11) NULL DEFAULT NULL,
  `titulo` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `lugares` int(11) NULL DEFAULT NULL,
  `cor` int(11) NULL DEFAULT NULL,
  `ordem` int(11) NULL DEFAULT NULL,
  `ref_id_mesa_evento` int(11) NOT NULL,
  `hand_for_hand_finalizado` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_torneio_index`(`id_torneio`) USING BTREE,
  INDEX `ordem_index`(`ordem`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 279 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for torneios_mesas_historico
-- ----------------------------
DROP TABLE IF EXISTS `torneios_mesas_historico`;
CREATE TABLE `torneios_mesas_historico`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `id_torneio` int(11) NULL DEFAULT NULL,
  `id_jogador` int(11) NULL DEFAULT NULL,
  `mesa` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `posicao` int(11) NOT NULL,
  `usuario` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_torneio_index`(`id_torneio`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1061 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for torneios_mesas_jogadores
-- ----------------------------
DROP TABLE IF EXISTS `torneios_mesas_jogadores`;
CREATE TABLE `torneios_mesas_jogadores`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_torneio` int(11) NULL DEFAULT NULL,
  `id_mesa` int(11) NULL DEFAULT NULL,
  `lugar` int(11) NULL DEFAULT NULL,
  `id_jogador` int(11) NOT NULL,
  `eliminado` int(11) NOT NULL,
  `ordem_eliminado` int(11) NOT NULL,
  `id_torneio_vinculado` int(11) NULL DEFAULT NULL,
  `num_alternate` int(11) NOT NULL,
  `reserva_id_jogador` int(11) NULL DEFAULT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_torneio_index`(`id_torneio`) USING BTREE,
  INDEX `id_mesa_index`(`id_mesa`) USING BTREE,
  INDEX `lugar_index`(`lugar`) USING BTREE,
  INDEX `id_jogador_index`(`id_jogador`) USING BTREE,
  INDEX `eliminado_index`(`eliminado`) USING BTREE,
  INDEX `ordem_eliminado_index`(`ordem_eliminado`) USING BTREE,
  INDEX `id_torneio_vinculado_index`(`id_torneio_vinculado`) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3660 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for torneios_mesas_moviment
-- ----------------------------
DROP TABLE IF EXISTS `torneios_mesas_moviment`;
CREATE TABLE `torneios_mesas_moviment`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_torneio` int(11) NULL DEFAULT NULL,
  `jogador` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `mesa_ant` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `lugar_ant` int(11) NOT NULL,
  `mesa` int(11) NULL DEFAULT NULL,
  `lugar` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_torneio_index`(`id_torneio`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 33 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for torneios_niveis
-- ----------------------------
DROP TABLE IF EXISTS `torneios_niveis`;
CREATE TABLE `torneios_niveis`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_torneio` int(11) NULL DEFAULT NULL,
  `nivel` int(11) NULL DEFAULT NULL,
  `tempo` int(11) NULL DEFAULT NULL,
  `small` int(11) NULL DEFAULT NULL,
  `big` int(11) NULL DEFAULT NULL,
  `ante` int(11) NULL DEFAULT NULL,
  `inicio_tempo` int(11) NULL DEFAULT NULL,
  `break` int(11) NULL DEFAULT NULL,
  `link_youtube` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `break_apos` int(11) NULL DEFAULT NULL,
  `late_register` int(11) NOT NULL,
  `ativo` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_torneio_index`(`id_torneio`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 9737 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for torneios_pagamentos
-- ----------------------------
DROP TABLE IF EXISTS `torneios_pagamentos`;
CREATE TABLE `torneios_pagamentos`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_torneio` int(11) NOT NULL,
  `id_registro` int(11) NOT NULL,
  `id_venda` int(11) NOT NULL,
  `id_jogador` int(11) NOT NULL,
  `id_forma_pgto` int(11) NOT NULL,
  `valor` decimal(20, 2) NOT NULL,
  `valor_taxa` decimal(20, 2) NOT NULL,
  `gid_taxa_conv` decimal(20, 4) NULL DEFAULT NULL,
  `data_vencimento` datetime(0) NULL DEFAULT NULL,
  `documento` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `emissao_entrada` int(11) NOT NULL,
  `registro_individual` int(11) NOT NULL,
  `id_premiacao` int(11) NULL DEFAULT NULL,
  `id_vaga` int(11) NULL DEFAULT NULL,
  `id_usuario` int(11) NULL DEFAULT NULL,
  `id_periodo` int(11) NULL DEFAULT NULL,
  `id_time` int(20) NULL DEFAULT NULL,
  `id_caixa_user` int(11) NULL DEFAULT NULL,
  `data_hora` datetime(0) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_torneio_index`(`id_torneio`) USING BTREE,
  INDEX `id_registro_index`(`id_registro`) USING BTREE,
  INDEX `id_venda_index`(`id_venda`) USING BTREE,
  INDEX `id_jogador_index`(`id_jogador`) USING BTREE,
  INDEX `id_forma_pgto_index`(`id_forma_pgto`) USING BTREE,
  INDEX `emissao_entrada_index`(`emissao_entrada`) USING BTREE,
  INDEX `registro_individual_index`(`registro_individual`) USING BTREE,
  INDEX `id_vaga_index`(`id_vaga`) USING BTREE,
  INDEX `id_usuario_index`(`id_usuario`) USING BTREE,
  INDEX `id_periodo_index`(`id_periodo`) USING BTREE,
  INDEX `id_caixa_lancamento_index`(`id_caixa_user`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2158 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for torneios_premiacoes
-- ----------------------------
DROP TABLE IF EXISTS `torneios_premiacoes`;
CREATE TABLE `torneios_premiacoes`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_torneio` int(11) NULL DEFAULT NULL,
  `posicao` int(11) NULL DEFAULT NULL,
  `descricao` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `valor` decimal(20, 2) NULL DEFAULT NULL,
  `valor_original` decimal(20, 2) NULL DEFAULT NULL,
  `id_jogador` int(11) NULL DEFAULT NULL,
  `id_usuario_confirmado` int(11) NULL DEFAULT NULL,
  `posicao_paga` int(11) NULL DEFAULT NULL,
  `horario_confirmado` datetime(0) NULL DEFAULT NULL,
  `tipo` int(11) NOT NULL,
  `id_grupo_vaga` int(11) NULL DEFAULT NULL,
  `id_vaga` int(11) NULL DEFAULT NULL,
  `id_grupo_ticket_nacional` int(11) NULL DEFAULT NULL,
  `id_ticket_nacional` int(11) NULL DEFAULT NULL,
  `valor_vaga` decimal(20, 2) NULL DEFAULT NULL,
  `bounty` int(11) NOT NULL,
  `bounty_qtd` decimal(20, 2) NOT NULL,
  `bounty_valor_unit` decimal(20, 2) NOT NULL,
  `creditado` int(11) NOT NULL,
  `creditado_data_hora` datetime(0) NULL DEFAULT NULL,
  `creditado_usuario` int(11) NULL DEFAULT NULL,
  `visivel` int(11) NULL DEFAULT NULL,
  `status` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_torneio_index`(`id_torneio`) USING BTREE,
  INDEX `id_jogador_index`(`id_jogador`) USING BTREE,
  INDEX `visivel_index`(`visivel`) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1508 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for torneios_prizes
-- ----------------------------
DROP TABLE IF EXISTS `torneios_prizes`;
CREATE TABLE `torneios_prizes`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_torneio` int(11) NULL DEFAULT NULL,
  `descricao` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `valor` decimal(20, 2) NULL DEFAULT NULL,
  `visivel` int(11) NULL DEFAULT NULL,
  `ordem` int(11) NULL DEFAULT NULL,
  `ordem_visivel` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for torneios_registros
-- ----------------------------
DROP TABLE IF EXISTS `torneios_registros`;
CREATE TABLE `torneios_registros`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_torneio` int(11) NULL DEFAULT NULL,
  `id_jogador` int(11) NULL DEFAULT NULL,
  `nome_cliente` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `dinheiro` decimal(20, 2) NULL DEFAULT NULL,
  `cartao` decimal(20, 2) NULL DEFAULT NULL,
  `cartao_cred` decimal(20, 2) NOT NULL,
  `cartao_taxa_deb` decimal(20, 2) NOT NULL,
  `cartao_taxa_cred` decimal(20, 2) NOT NULL,
  `cortesia` decimal(20, 2) NULL DEFAULT NULL,
  `credito` decimal(20, 2) NULL DEFAULT NULL,
  `debito` decimal(20, 2) NULL DEFAULT NULL,
  `total_debito` decimal(20, 2) NULL DEFAULT NULL,
  `total_credito` decimal(20, 2) NULL DEFAULT NULL,
  `total` decimal(20, 2) NULL DEFAULT NULL,
  `jogador_casa` int(11) NULL DEFAULT NULL,
  `chipcount` int(11) NULL DEFAULT NULL,
  `mesa_dia2` int(11) NULL DEFAULT NULL,
  `mesa_pos_dia2` int(11) NULL DEFAULT NULL,
  `saldo_congelado` decimal(20, 2) NULL DEFAULT NULL,
  `observacao` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_torneio_index`(`id_torneio`) USING BTREE,
  INDEX `id_jogador_index`(`id_jogador`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 473 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for torneios_registros_transf
-- ----------------------------
DROP TABLE IF EXISTS `torneios_registros_transf`;
CREATE TABLE `torneios_registros_transf`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_torneio` int(11) NULL DEFAULT NULL,
  `id_registro` int(11) NULL DEFAULT NULL,
  `id_jog_origem` int(11) NULL DEFAULT NULL,
  `id_jog_destino` int(11) NULL DEFAULT NULL,
  `valor` decimal(20, 2) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_torneio_index`(`id_torneio`) USING BTREE,
  INDEX `id_registro_index`(`id_registro`) USING BTREE,
  INDEX `id_jog_origem_index`(`id_jog_origem`) USING BTREE,
  INDEX `id_jog_destino_index`(`id_jog_destino`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for torneios_sit_estruturas
-- ----------------------------
DROP TABLE IF EXISTS `torneios_sit_estruturas`;
CREATE TABLE `torneios_sit_estruturas`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nome` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `max_jogs` int(11) NOT NULL,
  `valor` decimal(20, 2) NOT NULL,
  `rake` decimal(20, 2) NOT NULL,
  `fichas` int(20) NOT NULL,
  `premiacao_tipo` int(1) NOT NULL,
  `premiacao_json` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `status` int(1) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for torneios_telas_layout
-- ----------------------------
DROP TABLE IF EXISTS `torneios_telas_layout`;
CREATE TABLE `torneios_telas_layout`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nome` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `layout` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `layout_preview` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for torneios_tickets
-- ----------------------------
DROP TABLE IF EXISTS `torneios_tickets`;
CREATE TABLE `torneios_tickets`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_torneio` int(11) NULL DEFAULT NULL,
  `id_venda` int(11) NULL DEFAULT NULL,
  `id_item` int(11) NULL DEFAULT NULL COMMENT 'Usado para indicar o item, em caso de não houver id_venda',
  `id_jogador` int(11) NULL DEFAULT NULL,
  `area` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `mesa` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `mesa_id` int(11) NULL DEFAULT NULL,
  `lugar` int(11) NULL DEFAULT NULL,
  `alternate` int(11) NULL DEFAULT NULL,
  `alternate_numero` int(11) NULL DEFAULT NULL,
  `id_etapa` int(11) NULL DEFAULT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `utilizado` int(11) NOT NULL,
  `data_hora_utilizado` datetime(0) NULL DEFAULT NULL,
  `alterado` int(11) NOT NULL,
  `cancelado` int(11) NOT NULL,
  `data_hora_cancelado` datetime(0) NULL DEFAULT NULL,
  `cancelado_obs` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `cancelado_usuario` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_torneio_index`(`id_torneio`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 749 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for torneios_transferencias
-- ----------------------------
DROP TABLE IF EXISTS `torneios_transferencias`;
CREATE TABLE `torneios_transferencias`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_torneio` int(11) NULL DEFAULT NULL,
  `id_registro` int(11) NULL DEFAULT NULL,
  `id_venda` int(11) NULL DEFAULT NULL,
  `id_jogador` int(11) NULL DEFAULT NULL,
  `destino_id_jogador` int(11) NULL DEFAULT NULL,
  `destino_id_venda` int(11) NULL DEFAULT NULL,
  `id_evento` int(11) NULL DEFAULT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `id_time` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_torneio_index`(`id_torneio`) USING BTREE,
  INDEX `id_registro_index`(`id_registro`) USING BTREE,
  INDEX `id_venda_index`(`id_venda`) USING BTREE,
  INDEX `id_jogador_index`(`id_jogador`) USING BTREE,
  INDEX `destino_id_jogador_index`(`destino_id_jogador`) USING BTREE,
  INDEX `destino_id_venda_index`(`destino_id_venda`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 313 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for torneios_vagas_vinculadas
-- ----------------------------
DROP TABLE IF EXISTS `torneios_vagas_vinculadas`;
CREATE TABLE `torneios_vagas_vinculadas`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_torneio` int(11) NULL DEFAULT NULL,
  `id_grupo_vagas` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_torneio_index`(`id_torneio`) USING BTREE,
  INDEX `id_grupo_vagas_index`(`id_grupo_vagas`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 296 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for torneios_valores_caixa
-- ----------------------------
DROP TABLE IF EXISTS `torneios_valores_caixa`;
CREATE TABLE `torneios_valores_caixa`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_torneio` int(11) NOT NULL,
  `id_forma_pgto` int(11) NOT NULL,
  `valor` decimal(20, 2) NOT NULL,
  `data_hora` datetime(0) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_torneio_index`(`id_torneio`) USING BTREE,
  INDEX `id_forma_pgto_index`(`id_forma_pgto`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 99 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for torneios_vendas
-- ----------------------------
DROP TABLE IF EXISTS `torneios_vendas`;
CREATE TABLE `torneios_vendas`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_torneio` int(11) NULL DEFAULT NULL,
  `id_registro` int(11) NOT NULL,
  `id_jogador` int(11) NULL DEFAULT NULL,
  `dinheiro` decimal(20, 2) NOT NULL,
  `cartao` decimal(20, 2) NOT NULL,
  `cartao_cred` decimal(20, 2) NOT NULL,
  `cartao_taxa_deb` decimal(20, 2) NOT NULL,
  `cartao_taxa_cred` decimal(20, 2) NOT NULL,
  `cheque` decimal(20, 2) NOT NULL,
  `cortesia` decimal(20, 2) NOT NULL,
  `vagas` decimal(20, 2) NOT NULL,
  `outras_pendencias` decimal(20, 2) NOT NULL,
  `transferencia` decimal(20, 2) NOT NULL,
  `premiacao` decimal(20, 2) NULL DEFAULT NULL,
  `fechamento_jog` int(11) NOT NULL,
  `usuario` int(11) NULL DEFAULT NULL,
  `cod` int(11) NULL DEFAULT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `id_gameid_venda` int(11) NULL DEFAULT NULL,
  `id_evento` int(11) NOT NULL,
  `id_evento_caixa` int(11) NOT NULL,
  `id_caixa_user` int(11) NULL DEFAULT NULL,
  `excluido` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_torneio_index`(`id_torneio`) USING BTREE,
  INDEX `id_registro_index`(`id_registro`) USING BTREE,
  INDEX `id_jogador_index`(`id_jogador`) USING BTREE,
  INDEX `usuario_index`(`usuario`) USING BTREE,
  INDEX `cod_index`(`cod`) USING BTREE,
  INDEX `id_evento_caixa_index`(`id_evento_caixa`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2380 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for torneios_vendas_itens
-- ----------------------------
DROP TABLE IF EXISTS `torneios_vendas_itens`;
CREATE TABLE `torneios_vendas_itens`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_torneio` int(11) NULL DEFAULT NULL,
  `id_registro` int(11) NOT NULL,
  `id_jogador` int(11) NULL DEFAULT NULL,
  `id_venda` int(11) NULL DEFAULT NULL,
  `id_item` int(11) NULL DEFAULT NULL,
  `usuario` int(11) NULL DEFAULT NULL,
  `cod` int(11) NULL DEFAULT NULL,
  `usado` int(11) NOT NULL,
  `excluido` int(11) NOT NULL,
  `id_ticket` int(11) NOT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `id_evento` int(11) NOT NULL,
  `id_evento_caixa` int(11) NOT NULL,
  `id_caixa_user` int(11) NULL DEFAULT NULL,
  `ir_retido` int(11) NOT NULL,
  `id_time` int(20) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_torneio_index`(`id_torneio`) USING BTREE,
  INDEX `id_registro_index`(`id_registro`) USING BTREE,
  INDEX `id_jogador_index`(`id_jogador`) USING BTREE,
  INDEX `id_venda_index`(`id_venda`) USING BTREE,
  INDEX `id_item_index`(`id_item`) USING BTREE,
  INDEX `usuario_index`(`usuario`) USING BTREE,
  INDEX `cod_index`(`cod`) USING BTREE,
  INDEX `usado_index`(`usado`) USING BTREE,
  INDEX `id_evento_caixa_index`(`id_evento_caixa`) USING BTREE,
  INDEX `ir_retido_index`(`ir_retido`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2496 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for usuarios
-- ----------------------------
DROP TABLE IF EXISTS `usuarios`;
CREATE TABLE `usuarios`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `nome_completo` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `foto` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `endereco` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `cidade` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `uf` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `pais_id` int(11) NULL DEFAULT NULL,
  `doc_pais_id` int(11) NULL DEFAULT NULL,
  `doc_tipo_id` int(11) NULL DEFAULT NULL,
  `doc_numero` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `nascimento` date NULL DEFAULT NULL,
  `email` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `celular` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `login` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `senha` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `observacao` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `codigo` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `nivel` int(11) NULL DEFAULT NULL,
  `status` int(11) NULL DEFAULT NULL,
  `status_clubesonline` int(11) NOT NULL,
  `status_eventos` int(11) NOT NULL,
  `lang_layout` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cod_session` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `id_unidade_ativa` int(11) NOT NULL,
  `api_hash` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `excluido` int(11) NULL DEFAULT NULL,
  `ativo` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `login_index`(`login`(10)) USING BTREE,
  INDEX `senha_index`(`senha`(10)) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE,
  INDEX `excluido_index`(`excluido`) USING BTREE,
  INDEX `ativo_index`(`ativo`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 17 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

INSERT INTO `usuarios` VALUES (1, 'PokerWeb', 'PokerWeb', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'teste', '202cb962ac59075b964b07152d234b70', NULL, 'sisLocal', 1, 0, 0, 0, 'pt_BR', '1_UDnArNYD04Ngs8brhpwSCXPRaPK3y7', 10, 'abc123', 0, 1);

-- ----------------------------
-- Table structure for usuarios_acessos
-- ----------------------------
DROP TABLE IF EXISTS `usuarios_acessos`;
CREATE TABLE `usuarios_acessos`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_usuario` int(11) NULL DEFAULT NULL,
  `data_hora` datetime(0) NULL DEFAULT NULL,
  `cod_acesso` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `id_usuario_index`(`id_usuario`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1651 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for usuarios_grupos
-- ----------------------------
DROP TABLE IF EXISTS `usuarios_grupos`;
CREATE TABLE `usuarios_grupos`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `status` int(1) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `login_index`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 20 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for usuarios_grupos_rel
-- ----------------------------
DROP TABLE IF EXISTS `usuarios_grupos_rel`;
CREATE TABLE `usuarios_grupos_rel`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_usuario` int(11) NOT NULL,
  `id_grupo` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 26 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for usuarios_notas
-- ----------------------------
DROP TABLE IF EXISTS `usuarios_notas`;
CREATE TABLE `usuarios_notas`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_pai` int(11) NOT NULL,
  `id_usuario` int(11) NOT NULL,
  `mensagem` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `anexo` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `usuario_id` int(11) NOT NULL,
  `data_hora` datetime(0) NOT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for usuarios_permissoes
-- ----------------------------
DROP TABLE IF EXISTS `usuarios_permissoes`;
CREATE TABLE `usuarios_permissoes`  (
  `grupo_id` int(11) NOT NULL,
  `usuario_id` int(11) NOT NULL DEFAULT 0,
  `agente_id` int(11) NOT NULL,
  `usuarios_listar` int(11) NOT NULL,
  `usuarios_cadastrar` int(11) NOT NULL,
  `usuarios_painel` int(11) NOT NULL,
  `usuarios_editar` int(11) NOT NULL,
  `usuarios_permissoes` int(11) NOT NULL,
  `usuarios_excluir` int(11) NOT NULL,
  `usuarios_grupo_listar` int(11) NOT NULL,
  `usuarios_grupo_painel` int(11) NOT NULL,
  `usuarios_grupo_cadastrar` int(11) NOT NULL,
  `usuarios_grupo_editar` int(11) NOT NULL,
  `usuarios_grupo_excluir` int(11) NOT NULL,
  `torneio_abrir` int(11) NOT NULL,
  `torneio_abertos` int(11) NOT NULL,
  `torneio_auditoria` int(11) NOT NULL,
  `torneio_estrutura` int(11) NOT NULL,
  `torneio_fechados` int(11) NOT NULL,
  `torneio_galeria` int(11) NOT NULL,
  `torneio_excluir_itens` int(11) NOT NULL,
  `torneio_cancelar_inscricao` int(11) NOT NULL,
  `torneio_editar_ajustes_fin` int(11) NOT NULL,
  `torneio_aba_caixa` int(11) NOT NULL,
  `torneio_aba_registros` int(11) NOT NULL,
  `torneio_aba_vagas` int(11) NOT NULL,
  `torneio_aba_mesas` int(11) NOT NULL,
  `torneio_aba_controles` int(11) NOT NULL,
  `torneio_aba_layout` int(11) NOT NULL,
  `torneio_aba_ranking` int(11) NOT NULL,
  `torneio_aba_chip` int(11) NOT NULL,
  `torneio_aba_financeiro` int(11) NOT NULL,
  `torneio_aba_config` int(11) NOT NULL,
  `torneio_aba_fechar` int(11) NOT NULL,
  `cash_abrir` int(11) NOT NULL,
  `cash_abertos` int(11) NOT NULL,
  `cash_gerenciar` int(11) NOT NULL,
  `cash_fechar` int(11) NOT NULL,
  `cash_auditoria` int(11) NOT NULL,
  `cash_modalidades` int(11) NOT NULL,
  `cash_sangeur` int(11) NOT NULL,
  `cliente_abrir` int(11) NOT NULL,
  `cliente_novo` int(11) NOT NULL,
  `cliente_editar` int(11) NOT NULL,
  `cliente_limite` int(11) NOT NULL,
  `cliente_registro` int(11) NOT NULL,
  `cliente_grupos` int(11) NOT NULL,
  `cliente_alertas` int(11) NOT NULL,
  `cliente_lancamento` int(11) NOT NULL,
  `cliente_lancamento_editar` int(11) NOT NULL,
  `cliente_transferencia` int(11) NOT NULL,
  `cliente_liberar_inadimplente` int(11) NOT NULL,
  `cliente_excluir_notas` int(11) NOT NULL,
  `cliente_mesclar` int(11) NOT NULL,
  `cliente_ag_banc_realizar` int(11) NOT NULL,
  `cliente_ag_banc_confirmar` int(11) NOT NULL,
  `cliente_ag_banc_excluir` int(11) NOT NULL,
  `cliente_moeda_lancamento` int(11) NOT NULL,
  `bar_novo` int(11) NOT NULL,
  `bar_gerenciar` int(11) NOT NULL,
  `bar_fechar` int(11) NOT NULL,
  `bar_comanda` int(11) NOT NULL DEFAULT 0,
  `bar_comanda_pgt` int(11) NOT NULL,
  `bar_produtos` int(11) NOT NULL,
  `bar_estoque_ver` int(11) NOT NULL,
  `bar_estoque_editar` int(11) NOT NULL,
  `bar_auditoria` int(11) NOT NULL,
  `bar_fechados` int(11) NOT NULL,
  `bar_cartoes` int(11) NOT NULL,
  `bar_tela_cartoes` int(11) NOT NULL,
  `bar_tela_pedidos` int(11) NOT NULL,
  `ranking_abrir` int(11) NOT NULL DEFAULT 0,
  `ranking_gerenciar` int(11) NOT NULL,
  `ranking_fechados` int(11) NOT NULL,
  `vagas_abrir` int(11) NOT NULL,
  `vagas_gerenciar` int(11) NOT NULL,
  `vagas_cadastrar` int(11) NOT NULL,
  `vagas_encerradas` int(11) NOT NULL,
  `estatisticas_gerenciar` int(11) NOT NULL,
  `estatisticas_ver` int(11) NOT NULL,
  `relatorios_torneios` int(11) NOT NULL,
  `relatorios_cash` int(11) NOT NULL,
  `relatorios_bar` int(11) NOT NULL,
  `relatorios_clientes` int(11) NOT NULL,
  `relatorios_ranking` int(11) NOT NULL,
  `relatorios_vagas` int(11) NOT NULL,
  `financeiro_registros` int(11) NOT NULL,
  `financeiro_centros` int(11) NOT NULL,
  `financeiro_fornecedores` int(11) NOT NULL,
  `financeiro_geral` int(11) NOT NULL,
  `financeiro_ag_banc` int(11) NOT NULL,
  `jackpot_abrir` int(11) NOT NULL,
  `jackpot_gerenciar` int(11) NOT NULL,
  `jackpot_encerrados` int(11) NOT NULL,
  `torneio_admin` int(11) NOT NULL,
  `torneio_caixa` int(11) NOT NULL,
  `torneio_direcao` int(11) NOT NULL,
  `cash_rake_excluir` int(11) NOT NULL,
  `bar_comanda_excluir` int(11) NOT NULL,
  `bar_comanda_editar_pg` int(11) NOT NULL,
  `torneio_config_premiacao` int(11) NOT NULL,
  `torneio_premiar_jog` int(11) NOT NULL,
  `torneio_excluir_pgtos` int(11) NOT NULL,
  `torneio_excluir_transf` int(11) NOT NULL,
  `torneio_reverter_vagas` int(11) NOT NULL,
  `torneio_excluir_premiacoes` int(11) NOT NULL,
  `sistema_upgrade` int(11) NOT NULL,
  `sistema_faturas_boletos` int(11) NOT NULL,
  `financeiro_pgtos` int(11) NOT NULL,
  `financeiro_contas` int(11) NOT NULL,
  `bar_comanda_excluir_produto` int(11) NOT NULL,
  `bar_comanda_excluir_pedido` int(11) NOT NULL,
  `bar_comanda_excluir_comanda` int(11) NOT NULL,
  `cash_fichas_controle` int(11) NOT NULL,
  `cash_impressao_sangeur` int(11) NOT NULL,
  `financeiro_senha_forma_pgto` int(11) NOT NULL,
  `cash_venda_excluir` int(11) NOT NULL,
  `templates_editar` int(11) NOT NULL,
  `ev_etapa_criar` int(11) NOT NULL,
  `ev_etapa_fechar` int(11) NOT NULL,
  `ev_etapa_lib_bloq` int(11) NOT NULL,
  `ev_etapa_rels` int(11) NOT NULL,
  `ev_etapa_acesso_bloq` int(11) NOT NULL,
  `ev_periodo_criar` int(11) NOT NULL,
  `ev_periodo_fechar` int(11) NOT NULL,
  `ev_periodo_rels` int(11) NOT NULL,
  `ev_trn_criar` int(11) NOT NULL,
  `ev_trn_lib_bloq` int(11) NOT NULL,
  `ev_trn_users_bloq` int(11) NOT NULL,
  `ev_trn_aba_registro` int(11) NOT NULL,
  `ev_trn_aba_financeiro` int(11) NOT NULL,
  `ev_trn_aba_chipcount` int(11) NOT NULL,
  `ev_trn_aba_config` int(11) NOT NULL,
  `ev_trn_aba_fechar` int(11) NOT NULL,
  `ev_trn_mesas` int(11) NOT NULL,
  `ev_trn_blinds` int(11) NOT NULL,
  `ev_trn_estruturas` int(11) NOT NULL,
  `ev_sit_criar` int(11) NOT NULL,
  `ev_sit_config` int(11) NOT NULL,
  `ev_sit_painel` int(11) NOT NULL,
  `ev_sit_inscricao` int(11) NOT NULL,
  `ev_sit_prem_config` int(11) NOT NULL,
  `ev_sit_prem_emitir` int(11) NOT NULL,
  `ev_sit_prem_reverter_abertas` int(11) NOT NULL,
  `ev_sit_prem_reverter_full` int(11) NOT NULL,
  `ev_sit_estrutura` int(11) NOT NULL,
  `ev_sit_fechados` int(11) NOT NULL,
  `ev_sit_excluir_inscricao` int(11) NOT NULL,
  `ev_sit_excluir` int(11) NOT NULL,
  `ev_sit_reabrir` int(11) NOT NULL,
  `ev_sit_relatorio` int(11) NOT NULL,
  `ev_cx_vendas` int(11) NOT NULL,
  `ev_cx_vendas_saldos` int(11) NOT NULL,
  `ev_cx_vendas_extrato` int(11) NOT NULL,
  `ev_cx_ticket_reimprimir` int(11) NOT NULL,
  `ev_cx_ticket_editar` int(11) NOT NULL,
  `ev_cx_jog_extrato` int(11) NOT NULL,
  `ev_cx_jog_pgto` int(11) NOT NULL,
  `ev_cx_jog_pgto_excluir` int(11) NOT NULL,
  `ev_cx_jog_vaga_utilizada_excluir` int(11) NOT NULL,
  `ev_cx_jog_saque` int(11) NOT NULL,
  `ev_cx_jog_transf` int(11) NOT NULL,
  `ev_cx_jog_ag_banc` int(11) NOT NULL,
  `ev_cx_jog_ag_banc_ver` int(11) NOT NULL,
  `ev_cx_jog_ag_banc_confirmar` int(11) NOT NULL,
  `ev_cx_jog_ag_banc_editar` int(11) NOT NULL,
  `ev_cx_jog_ag_banc_excluir` int(11) NOT NULL,
  `ev_cx_jog_vinc_credito` int(11) NOT NULL,
  `ev_cx_jog_vagas` int(11) NOT NULL,
  `ev_cx_jog_cadastro_ver` int(11) NOT NULL,
  `ev_cx_jog_cadastro_editar` int(11) NOT NULL,
  `ev_cx_jog_limite_editar` int(11) NOT NULL,
  `ev_cx_jog_excluir_venda` int(11) NOT NULL,
  `ev_cx_jog_excluir_saque_pgto` int(11) NOT NULL,
  `ev_cx_jog_excluir_transf` int(11) NOT NULL,
  `ev_cx_user_fin_alt_fpgto` int(11) NOT NULL,
  `ev_cx_user_ver` int(11) NOT NULL,
  `ev_cx_user_criar` int(11) NOT NULL,
  `ev_cx_user_lib_bloq` int(11) NOT NULL,
  `ev_cx_user_fechar` int(11) NOT NULL,
  `ev_cx_user_movim` int(11) NOT NULL,
  `ev_prem_emitir` int(11) NOT NULL,
  `ev_prem_config` int(11) NOT NULL,
  `ev_prem_reverter` int(11) NOT NULL,
  `ev_prem_reverter_vg` int(11) NOT NULL,
  `ev_prem_creditar` int(11) NOT NULL,
  `ev_vagas_ver` int(11) NOT NULL,
  `ev_vagas_criar` int(11) NOT NULL,
  `ev_vagas_lib_bloq` int(11) NOT NULL,
  `ev_vagas_cadastrar` int(11) NOT NULL,
  `ev_vagas_transferir` int(11) NOT NULL,
  `ev_vagas_outros_torneios` int(11) NOT NULL,
  `ev_vagas_comprar` int(11) NOT NULL,
  `ev_vagas_excluir` int(11) NOT NULL,
  `ev_vagas_painel_parceiro` int(11) NOT NULL,
  `ev_alertas_visualizar` int(11) NOT NULL,
  `ev_alertas_visualizar_jogs` int(11) NOT NULL,
  `ev_alertas_criar` int(11) NOT NULL,
  `ev_alertas_editar` int(11) NOT NULL,
  `ev_alertas_jogs_incluir` int(11) NOT NULL,
  `ev_alertas_jogs_remover` int(11) NOT NULL,
  `ev_alertas_excluir` int(11) NOT NULL,
  `ev_user_permissoes` int(11) NOT NULL,
  `ev_excluir_venda_item` int(11) NOT NULL,
  `ev_fingeral` int(11) NOT NULL,
  `ev_fingeral_config` int(11) NOT NULL,
  `ev_fingeral_cx_users` int(11) NOT NULL,
  `ev_impostos` int(11) NOT NULL,
  `ev_imprensa` int(11) NOT NULL,
  `co_fingeral_movimentacoes` int(11) NOT NULL,
  `co_fingeral_registros` int(11) NOT NULL,
  `co_fingeral_config` int(11) NOT NULL,
  `co_jogador_criar` int(11) NOT NULL,
  `co_jogador_editar` int(11) NOT NULL,
  `co_jogador_caixa` int(11) NOT NULL,
  `co_jogador_ficha_enviar` int(11) NOT NULL,
  `co_jogador_ficha_receber` int(11) NOT NULL,
  `co_jogador_valor_enviar` int(11) NOT NULL,
  `co_jogador_valor_receber` int(11) NOT NULL,
  `co_jogador_lancamento_excluir` int(11) NOT NULL,
  `co_agente_listar` int(11) NOT NULL,
  `co_agente_criar` int(11) NOT NULL,
  `co_agente_editar` int(11) NOT NULL,
  `co_agente_excluir` int(11) NOT NULL,
  `co_agente_permissoes` int(11) NOT NULL,
  `co_agente_acesso` int(11) NOT NULL,
  `co_agente_detalhes` int(11) NOT NULL,
  `co_agente_ficha_enviar` int(11) NOT NULL,
  `co_agente_ficha_receber` int(11) NOT NULL,
  `co_agente_valor_enviar` int(11) NOT NULL,
  `co_agente_valor_receber` int(11) NOT NULL,
  `co_agente_lancamento_excluir` int(11) NOT NULL,
  `co_agente_transferencia` int(11) NOT NULL,
  `co_clube_arq_upload` int(11) NOT NULL,
  `co_clube_arq_visualizar` int(11) NOT NULL,
  `co_clube_arq_excluir` int(11) NOT NULL,
  `co_clube_arq_registrar_rake_agentes` int(11) NOT NULL,
  `co_clube_criar` int(11) NOT NULL,
  `co_clube_editar` int(11) NOT NULL,
  `co_clube_excluir` int(11) NOT NULL,
  `co_clube_detalhes` int(11) NOT NULL,
  `co_clube_caixa` int(11) NOT NULL,
  `co_clube_valor_enviar` int(11) NOT NULL,
  `co_clube_valor_receber` int(11) NOT NULL,
  `co_clube_lancamento_excluir` int(11) NOT NULL,
  `co_clube_lancamento_diamantes` int(11) NOT NULL,
  `co_clube_lancamento_outros` int(11) NOT NULL,
  `co_clube_lancamento_fichas` int(11) NOT NULL,
  `co_clube_lancamento_clube` int(11) NOT NULL,
  `co_clube_gerar_codigo_vinculo` int(11) NOT NULL,
  `co_liga_arq_upload` int(11) NOT NULL,
  `co_liga_arq_visualizar` int(11) NOT NULL,
  `co_liga_arq_excluir` int(11) NOT NULL,
  `co_liga_arq_overlay_ajustar` int(11) NOT NULL,
  `co_liga_arq_registrar_resultados_clubes` int(11) NOT NULL,
  `co_liga_arq_registrar_rake_agentes` int(11) NOT NULL,
  `co_liga_fechamento_visualizar` int(11) NOT NULL,
  `co_liga_fechamento_criar` int(11) NOT NULL,
  `co_liga_fechamento_excluir` int(11) NOT NULL,
  `co_liga_fechamento_registrar` int(11) NOT NULL,
  `co_liga_relatorios_diamantes` int(11) NOT NULL,
  `co_liga_torneio_meta_visualizar` int(11) NOT NULL,
  `co_liga_torneio_meta_editar` int(11) NOT NULL,
  `co_liga_multiligas` int(11) NOT NULL,
  `co_clubes_ids_acesso` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `co_configs_geral` int(11) NOT NULL,
  `gameid_solicitacoes` int(11) NOT NULL,
  `gameid_configs` int(11) NOT NULL,
  `gameid_qrcodes` int(11) NOT NULL,
  `gameid_tickets` int(11) NOT NULL,
  `gid_validacao_listar` int(11) NOT NULL,
  `gid_validacao_avaliar` int(11) NOT NULL,
  `gid_validacao_aprovar` int(11) NOT NULL,
  `gid_validacao_aprovar_pre` int(11) NOT NULL,
  `gid_validacao_reprovar` int(11) NOT NULL,
  `rep_clube_solicitar_cadastro` int(11) NOT NULL,
  `rep_clube_abrir` int(11) NOT NULL,
  `rep_moeda_lancamentos` int(11) NOT NULL,
  `rep_moeda_visualizar_extrato` int(11) NOT NULL,
  `rep_moeda_excluir` int(11) NOT NULL,
  `rep_tickets_grupo_status` int(11) NOT NULL,
  `rep_tickets_grupo_fechar` int(11) NOT NULL,
  `rep_tickets_grupo_excluir` int(11) NOT NULL,
  `rep_tickets_painel` int(11) NOT NULL,
  `rep_tickets_gerenciar` int(11) NOT NULL,
  `rep_tickets_excluir` int(11) NOT NULL,
  `rep_rels_moeda_representante` int(11) NOT NULL,
  `rep_rels_moeda_clubes` int(11) NOT NULL,
  `rep_rels_moeda_jogadores` int(11) NOT NULL
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for vagas_grupos
-- ----------------------------
DROP TABLE IF EXISTS `vagas_grupos`;
CREATE TABLE `vagas_grupos`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `data_abertura` date NULL DEFAULT NULL,
  `id_usuario_abertura` int(11) NULL DEFAULT NULL,
  `data_fechamento` date NULL DEFAULT NULL,
  `id_usuario_fechamento` int(11) NULL DEFAULT NULL,
  `nome` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `valor_vaga` decimal(20, 2) NULL DEFAULT NULL,
  `meta_qtd` int(11) NULL DEFAULT NULL,
  `qtd_final_vagas` int(11) NULL DEFAULT NULL,
  `id_evento` int(11) NULL DEFAULT NULL,
  `linkado_ranking` int(11) NULL DEFAULT NULL,
  `linkado_torneio` int(11) NULL DEFAULT NULL,
  `ref_id_grupo_ticket_nacional` int(11) NULL DEFAULT NULL,
  `status` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 214 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for vagas_historico
-- ----------------------------
DROP TABLE IF EXISTS `vagas_historico`;
CREATE TABLE `vagas_historico`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_vaga` int(11) NULL DEFAULT NULL,
  `horario` datetime(0) NULL DEFAULT NULL,
  `id_jogador_anterior` int(11) NULL DEFAULT NULL,
  `id_jogador_novo` int(11) NULL DEFAULT NULL,
  `tipo` int(11) NULL DEFAULT NULL,
  `id_usuario` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_vaga_index`(`id_vaga`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 71 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for vagas_origens
-- ----------------------------
DROP TABLE IF EXISTS `vagas_origens`;
CREATE TABLE `vagas_origens`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `titulo` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for vagas_registros
-- ----------------------------
DROP TABLE IF EXISTS `vagas_registros`;
CREATE TABLE `vagas_registros`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_grupo` int(11) NULL DEFAULT NULL,
  `data` date NULL DEFAULT NULL,
  `id_jogador` int(11) NULL DEFAULT NULL,
  `valor` decimal(20, 2) NULL DEFAULT NULL,
  `valor_arrecadado` decimal(20, 2) NULL DEFAULT NULL,
  `valor_utilizado` decimal(20, 2) NULL DEFAULT NULL,
  `valor_compra` decimal(20, 2) NULL DEFAULT NULL,
  `saldo_valor` decimal(20, 2) NULL DEFAULT NULL,
  `torneio` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `cod_cadastro` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `id_torneio` int(11) NULL DEFAULT NULL,
  `id_ranking` int(11) NULL DEFAULT NULL,
  `id_usuario_cadastro` int(11) NULL DEFAULT NULL,
  `id_premiacao` int(11) NULL DEFAULT NULL,
  `id_transferencia` int(11) NULL DEFAULT NULL,
  `id_usuario_transferencia` int(11) NULL DEFAULT NULL,
  `id_jogador_uso` int(11) NULL DEFAULT NULL,
  `id_usuario_uso` int(11) NULL DEFAULT NULL,
  `id_grupo_ticket_nacional` int(11) NULL DEFAULT NULL,
  `id_ticket_nacional` int(11) NULL DEFAULT NULL,
  `data_uso` date NULL DEFAULT NULL,
  `torneio_uso` int(11) NOT NULL,
  `id_jogador_compra` int(11) NULL DEFAULT NULL,
  `id_usuario_compra` int(11) NULL DEFAULT NULL,
  `data_compra` date NULL DEFAULT NULL,
  `observacao` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `id_conta` int(11) NOT NULL,
  `id_evento` int(11) NULL DEFAULT NULL,
  `id_periodo` int(11) NULL DEFAULT NULL,
  `id_venda_uso` int(11) NULL DEFAULT NULL,
  `id_vaga_pai` int(11) NULL DEFAULT NULL,
  `gameid_reservado` int(11) NOT NULL,
  `gameid_id_venda` int(11) NOT NULL,
  `status` int(11) NULL DEFAULT NULL,
  `data_hora_cadastro` datetime(0) NULL DEFAULT NULL,
  `data_hora_uso` datetime(0) NULL DEFAULT NULL,
  `data_hora_compra` datetime(0) NULL DEFAULT NULL,
  `excluido` int(1) NOT NULL,
  `excluido_data_hora` datetime(0) NULL DEFAULT NULL,
  `excluido_obs` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `excluido_usuario` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id_index`(`id`) USING BTREE,
  INDEX `id_grupo_index`(`id_grupo`) USING BTREE,
  INDEX `id_jogador_index`(`id_jogador`) USING BTREE,
  INDEX `cod_cadastro_index`(`cod_cadastro`(10)) USING BTREE,
  INDEX `id_torneio_index`(`id_torneio`) USING BTREE,
  INDEX `id_ranking_index`(`id_ranking`) USING BTREE,
  INDEX `id_transferencia_index`(`id_transferencia`) USING BTREE,
  INDEX `id_jogador_uso_index`(`id_jogador_uso`) USING BTREE,
  INDEX `torneio_uso_index`(`torneio_uso`) USING BTREE,
  INDEX `id_jogador_compra_index`(`id_jogador_compra`) USING BTREE,
  INDEX `status_index`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 314 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;
