--
-- Host: localhost    Database: noss2142_galetobia
-- ------------------------------------------------------


--
-- Table structure for table `categoria`
--

CREATE TABLE `categoria` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nome` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `categoria`
--

INSERT INTO `categoria` (`id`, `nome`) VALUES (1,'Supermercado'),(2,'Frutos do Mar'),(3,'Material de Limpeza'),(4,'Material Descartavel'),(5,'Carnes'),(6,'Frios e Congelados'),(7,'Refrigerantes '),(8,'Sumos'),(9,'Vinhos'),(10,'Aperitivos'),(11,'Licores'),(12,'Digestivos'),(13,'Carnes'),(14,'Enchidos'),(15,'Sobremesa'),(16,'Hortifruta');

--
-- Table structure for table `despesas`
--

CREATE TABLE `despesas` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `idfornecedor` int(11) NOT NULL,
  `valor_compra` double NOT NULL,
  `data_compra` date NOT NULL,
  `user` int(11) DEFAULT NULL,
  `mes` char(2) DEFAULT NULL,
  `ano` char(4) DEFAULT NULL,
  `mesano` char(6) DEFAULT NULL,
  `data_venc` date DEFAULT NULL,
  `descricao` text DEFAULT NULL,
  `valor_iva` double DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_despesas_1` (`idfornecedor`),
  KEY `fk_despesas_user` (`user`),
  CONSTRAINT `fk_despesas_1` FOREIGN KEY (`idfornecedor`) REFERENCES `fornecedor` (`idfornecedor`),
  CONSTRAINT `fk_despesas_user` FOREIGN KEY (`user`) REFERENCES `system_users` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=160 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `despesas`
--

INSERT INTO `despesas` (`id`, `idfornecedor`, `valor_compra`, `data_compra`, `user`, `mes`, `ano`, `mesano`, `data_venc`, `descricao`, `valor_iva`) VALUES (5,2,46.54,'2025-09-05',3,'09','2025','092025',NULL,NULL,NULL),(6,2,169.67,'2025-09-02',3,'09','2025','092025',NULL,NULL,NULL),(7,2,241.5,'2025-09-03',3,'09','2025','092025',NULL,NULL,NULL),(8,2,195.15,'2025-09-05',3,'09','2025','092025',NULL,NULL,NULL),(9,2,131.23,'2025-09-04',3,'09','2025','092025',NULL,NULL,NULL),(10,3,414.7,'2025-09-03',3,'09','2025','092025',NULL,NULL,NULL),(11,2,73.62,'2025-09-02',3,'09','2025','092025',NULL,NULL,NULL),(12,5,129.9,'2025-09-02',3,'09','2025','092025',NULL,NULL,NULL),(13,6,15.38,'2025-09-05',3,'09','2025','092025',NULL,NULL,NULL),(14,7,104.18,'2025-09-03',3,'09','2025','092025',NULL,NULL,NULL),(15,8,429.99,'2025-09-01',3,'09','2025','092025',NULL,NULL,NULL),(16,10,20.16,'2025-09-02',3,'09','2025','092025',NULL,NULL,NULL),(18,10,16.39,'2025-09-02',3,'09','2025','092025',NULL,NULL,NULL),(19,11,16.47,'2025-09-02',3,'09','2025','092025',NULL,NULL,NULL),(20,12,10.23,'2025-09-03',3,'09','2025','092025',NULL,NULL,NULL),(21,12,15.19,'2025-09-09',3,'09','2025','092025',NULL,NULL,NULL),(22,13,3.98,'2025-09-02',3,'09','2025','092025',NULL,NULL,NULL),(23,4,37.85,'2025-09-07',3,'09','2025','092025',NULL,NULL,NULL),(24,14,7.84,'2025-09-02',3,'09','2025','092025',NULL,NULL,NULL),(25,11,25.77,'2025-09-10',3,'09','2025','092025',NULL,NULL,NULL),(26,15,323.13,'2025-09-11',3,'09','2025','092025',NULL,NULL,NULL),(27,16,21.7,'2025-09-08',3,'09','2025','092025',NULL,NULL,NULL),(28,12,8.85,'2025-09-09',3,'09','2025','092025',NULL,NULL,NULL),(29,17,59.9,'2025-09-07',3,'09','2025','092025',NULL,NULL,NULL),(30,18,2,'2025-09-11',3,'09','2025','092025',NULL,NULL,NULL),(31,19,108.12,'2025-09-11',3,'09','2025','092025','2025-09-18',NULL,NULL),(32,10,15.61,'2025-09-11',3,'09','2025','092025','2025-09-11',NULL,NULL),(33,20,169.02,'2025-09-02',3,'09','2025','092025','2025-09-11',NULL,NULL),(34,3,198.02,'2025-09-09',3,'09','2025','092025','2025-09-09',NULL,NULL),(35,5,144,'2025-09-09',3,'09','2025','092025','2025-09-17',NULL,NULL),(36,3,279.79,'2025-09-11',3,'09','2025','092025','2025-09-11',NULL,NULL),(37,2,211.34,'2025-09-10',3,'09','2025','092025','2025-09-10',NULL,NULL),(38,7,107.19,'2025-09-10',3,'09','2025','092025','2025-09-10',NULL,NULL),(39,2,982.77,'2025-09-06',3,'09','2025','092025','2025-09-06',NULL,NULL),(40,21,40.22,'2025-09-04',3,'09','2025','092025','2025-09-16',NULL,NULL),(41,2,94.06,'2025-09-11',3,'09','2025','092025','2025-09-11',NULL,NULL),(42,22,270.14,'2025-09-10',3,'09','2025','092025','2025-09-23',NULL,NULL),(43,23,28.17,'2025-09-09',3,'09','2025','092025','2025-09-24',NULL,NULL),(44,24,47.06,'2025-09-09',3,'09','2025','092025','2025-09-24',NULL,NULL),(45,25,65.66,'2025-09-10',3,'09','2025','092025','2025-09-24',NULL,NULL),(46,20,189.32,'2025-09-09',3,'09','2025','092025','2025-09-24',NULL,NULL),(47,2,158.88,'2025-09-07',3,'09','2025','092025','2025-09-07',NULL,NULL),(48,3,79.75,'2025-09-04',3,'09','2025','092025','2025-09-04',NULL,NULL),(49,3,79.91,'2025-09-06',3,'09','2025','092025','2025-09-06',NULL,NULL),(50,3,319.19,'2025-09-04',3,'09','2025','092025','2025-09-04',NULL,NULL),(51,5,132.12,'2025-09-05',3,'09','2025','092025','2025-09-13',NULL,NULL),(52,2,143.63,'2025-09-06',3,'09','2025','092025','2025-09-06',NULL,NULL),(53,2,125.75,'2025-09-06',3,'09','2025','092025','2025-09-06',NULL,NULL),(54,3,232.35,'2025-09-02',3,'09','2025','092025','2025-09-02',NULL,NULL),(55,2,75.62,'2025-09-02',3,'09','2025','092025','2025-09-02',NULL,NULL),(56,2,138.18,'2025-09-04',3,'09','2025','092025','2025-09-04',NULL,NULL),(57,5,167.15,'2025-09-16',3,'09','2025','092025','2025-09-24',NULL,NULL),(58,3,207.75,'2025-09-13',3,'09','2025','092025','2025-09-13',NULL,NULL),(59,21,97.05,'2025-09-11',3,'09','2025','092025','2025-09-19',NULL,NULL),(60,2,339.74,'2025-09-12',3,'09','2025','092025','2025-09-12',NULL,NULL),(61,5,140.55,'2025-09-12',3,'09','2025','092025','2025-09-20',NULL,NULL),(62,2,45.83,'2025-09-12',3,'09','2025','092025','2025-09-12',NULL,NULL),(63,5,35.82,'2025-09-13',3,'09','2025','092025','2025-09-21',NULL,NULL),(64,2,99.5,'2025-09-13',3,'09','2025','092025','2025-09-13',NULL,NULL),(65,26,95.26,'2025-09-11',3,'09','2025','092025','2025-09-27',NULL,NULL),(66,27,140.71,'2025-09-03',3,'09','2025','092025','2025-09-10',NULL,NULL),(67,6,15.38,'2025-09-09',3,'09','2025','092025','2025-09-12',NULL,NULL),(68,28,60.48,'2025-09-13',3,'09','2025','092025','2025-09-19',NULL,NULL),(69,2,152.29,'2025-09-14',3,'09','2025','092025','2025-09-14',NULL,NULL),(70,3,164.66,'2025-09-16',3,'09','2025','092025','2025-09-16',NULL,NULL),(71,15,173.9,'2025-09-04',3,'09','2025','092025','2025-09-11',NULL,NULL),(72,6,15.38,'2025-09-16',3,'09','2025','092025','2025-09-19',NULL,NULL),(73,6,15.38,'2025-09-02',3,'09','2025','092025','2025-09-05',NULL,NULL),(74,16,27.35,'2025-09-07',3,'09','2025','092025','2025-09-07',NULL,NULL),(75,29,55.97,'2025-09-02',3,'09','2025','092025','2025-09-16',NULL,NULL),(76,30,6.99,'2025-09-16',3,'09','2025','092025','2025-09-19',NULL,NULL),(77,30,14.02,'2025-09-11',3,'09','2025','092025','2025-09-16',NULL,NULL),(78,31,24.51,'2025-09-01',3,'09','2025','092025','2025-09-01',NULL,NULL),(79,32,29.11,'2025-09-01',3,'09','2025','092025','2025-09-01',NULL,NULL),(80,33,6.76,'2025-09-14',3,'09','2025','092025','2025-09-14',NULL,NULL),(81,34,26.62,'2025-09-16',3,'09','2025','092025','2025-09-16',NULL,NULL),(82,35,59.9,'2025-09-07',3,'09','2025','092025','2025-09-07',NULL,NULL),(83,33,37.76,'2025-09-03',3,'09','2025','092025','2025-09-03',NULL,NULL),(84,34,16.47,'2025-09-02',3,'09','2025','092025','2025-09-02',NULL,NULL),(97,27,140.71,'2025-09-17',3,'09','2025','092025','2025-09-17',NULL,NULL),(98,37,5.05,'2025-09-17',3,'09','2025','092025','2025-09-17',NULL,NULL),(99,21,21.53,'2025-09-18',3,'09','2025','092025','2025-09-26',NULL,NULL),(100,21,15.01,'2025-09-18',3,'09','2025','092025','2025-09-26',NULL,NULL),(101,39,281.67,'2025-09-07',3,'09','2025','092025','2025-09-07',NULL,NULL),(102,2,227.69,'2025-09-19',3,'09','2025','092025','2025-09-19',NULL,NULL),(103,37,4.9,'2025-09-19',3,'09','2025','092025','2025-09-19',NULL,NULL),(104,2,36.15,'2025-09-23',3,'09','2025','092025','2025-09-23',NULL,NULL),(105,2,72.71,'2025-09-20',3,'09','2025','092025','2025-09-20',NULL,NULL),(106,2,257.39,'2025-09-21',3,'09','2025','092025','2025-09-21',NULL,NULL),(107,3,258.81,'2025-09-23',3,'09','2025','092025','2025-09-23',NULL,NULL),(108,3,278.5,'2025-09-20',3,'09','2025','092025','2025-09-20',NULL,NULL),(109,7,183.89,'2025-09-20',3,'09','2025','092025','2025-09-20',NULL,NULL),(110,4,61.52,'2025-09-23',3,'09','2025','092025','2025-09-23',NULL,NULL),(111,40,4.65,'2025-09-22',3,'09','2025','092025','2025-09-22',NULL,NULL),(112,28,56.42,'2025-09-20',3,'09','2025','092025','2025-09-20',NULL,NULL),(113,41,23.5,'2025-09-14',3,'09','2025','092025','2025-09-14',NULL,NULL),(114,43,20,'2025-09-22',3,'09','2025','092025','2025-09-22',NULL,NULL),(115,44,15.05,'2025-09-06',3,'09','2025','092025','2025-09-06',NULL,NULL),(116,45,26.4,'2025-09-22',3,'09','2025','092025','2025-09-22',NULL,NULL),(117,46,13.37,'2025-09-22',3,'09','2025','092025','2025-09-22',NULL,NULL),(118,47,32.12,'2025-09-22',3,'09','2025','092025','2025-09-22',NULL,0),(159,54,750,'2025-11-08',3,'11','2025','112025','2025-11-08',' NOVEMBRO ',0);

--
-- Table structure for table `entrada`
--

CREATE TABLE `entrada` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `fornecedor_id` int(11) DEFAULT NULL,
  `data_entrada` datetime NOT NULL,
  `vencimento` date DEFAULT NULL,
  `total` double DEFAULT NULL,
  `acrescimo` double DEFAULT NULL,
  `desconto` double DEFAULT NULL,
  `competencia` date DEFAULT NULL,
  `numero` int(11) DEFAULT NULL,
  `status` char(1) DEFAULT NULL,
  `valor_original` double DEFAULT NULL,
  `valor_iva` double DEFAULT NULL,
  `mes` char(2) DEFAULT NULL,
  `ano` char(4) DEFAULT NULL,
  `mesano` char(6) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_entrada_1_1` (`fornecedor_id`),
  CONSTRAINT `fk_entrada_1_1` FOREIGN KEY (`fornecedor_id`) REFERENCES `fornecedor` (`idfornecedor`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `entrada`
--


--
-- Table structure for table `fornecedor`
--

CREATE TABLE `fornecedor` (
  `idfornecedor` int(11) NOT NULL AUTO_INCREMENT,
  `nome` varchar(50) NOT NULL,
  PRIMARY KEY (`idfornecedor`)
) ENGINE=InnoDB AUTO_INCREMENT=55 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `fornecedor`
--

INSERT INTO `fornecedor` (`idfornecedor`, `nome`) VALUES (1,'Pingo Doce'),(2,'MAKRO'),(3,'RECHEIO'),(4,'PINGO DOCE'),(5,'MEIGAL'),(6,'LUIS PEDRO SANTOS SILVA'),(7,'TALHA DA ALDEIA'),(8,'RADIO POPULAR'),(9,'RADIO POPULAR'),(10,'OBRAMAT'),(11,'LIDLI'),(12,'QER QUEIJO'),(13,'FRUTARIA MINI MERCADO'),(14,'VITAL LUZ'),(15,'NOVADIS'),(16,'CONTINENTE'),(17,'SEASIDE'),(18,'COPY SHOP'),(19,'MARIO & ARTHUR'),(20,'REAL TRADIÇÃO'),(21,'HIGIENETE'),(22,'DELTA HOUSE'),(23,'COME OVO'),(24,'ACÁCIO PEREIRA'),(25,'FRIJOBEL'),(26,'DUVAS & ARRUDA'),(27,'CARBON CLEAN-CARVÕES'),(28,'AFONSO DOS LEITÕES'),(29,'PANFREIXO'),(30,'QUER QUEIJO'),(31,'C&A'),(32,'LEFTIES'),(33,'PINGO DOCE'),(34,'LIDL'),(35,'SIASIDE'),(36,'PARFOIS'),(37,'RESTAURANTES'),(38,'PACKFILM'),(39,'KASHPOS'),(40,'FNAC'),(41,'PRIO'),(42,'PRIMARK'),(43,'PRIMARK'),(44,'MÓ'),(45,'HIPER CASA'),(46,'MERCADO BRASIL'),(47,'MERCADONA'),(48,'SR.BACALHAU'),(49,'REAL TRADIÇÃO'),(50,'TALHOS SUPERDESCONTO'),(51,'SOCIEDADE AGRÍCOLA FIGUEIRINHA'),(52,'NC-GOURMET,LDA'),(53,'PROSECUR'),(54,'ALUGUEL LOJA');

--
-- Table structure for table `produto`
--

CREATE TABLE `produto` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `unidade_id` int(11) NOT NULL,
  `categoria_id` int(11) NOT NULL,
  `nome` varchar(100) NOT NULL,
  `custo_atual` double DEFAULT NULL,
  `custo_medio` double DEFAULT NULL,
  `custo1` double DEFAULT NULL,
  `custo2` double DEFAULT NULL,
  `custo3` double DEFAULT NULL,
  `barra` varchar(14) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_produto_1_1` (`unidade_id`),
  KEY `fk_produto_2_2` (`categoria_id`),
  CONSTRAINT `fk_produto_1_1` FOREIGN KEY (`unidade_id`) REFERENCES `unidade` (`id`),
  CONSTRAINT `fk_produto_2_2` FOREIGN KEY (`categoria_id`) REFERENCES `categoria` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=138 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `produto`
--

INSERT INTO `produto` (`id`, `unidade_id`, `categoria_id`, `nome`, `custo_atual`, `custo_medio`, `custo1`, `custo2`, `custo3`, `barra`) VALUES (1,2,1,'teste',500,167.33333333333,500,1,1,NULL),(2,2,4,'FORMA DE ALUMINIO E500 EM09',80,80,80,80,80,NULL),(3,2,4,'TAMPA P/FORMA DE ALUMINIO E500 EM09',NULL,NULL,NULL,NULL,NULL,NULL),(4,5,3,'DET.LOIÇA MANUAL(MAÇA) 5L',NULL,NULL,NULL,NULL,NULL,NULL),(5,8,3,'CAIXA C/LUVAS NITRILO PRETA XL',NULL,NULL,NULL,NULL,NULL,NULL),(6,1,5,'PICANHA NOV URUG NIREA BLACK ANGUS CONG.',NULL,NULL,NULL,NULL,NULL,NULL),(7,1,5,'LARGATO P PRETO CONG.',NULL,NULL,NULL,NULL,NULL,NULL),(8,1,5,'SECRETOS PRESA P PRETO CONG.',NULL,NULL,NULL,NULL,NULL,NULL),(9,1,13,'LEITÃO',NULL,NULL,NULL,NULL,NULL,NULL),(10,2,4,'CX.ALUMINIO 1250 ML PACK 100 UN',NULL,NULL,NULL,NULL,NULL,NULL),(11,5,1,'OLEO TEMPERO 5 LTS',NULL,NULL,NULL,NULL,NULL,NULL),(12,5,3,'LOUÇA MAQUINA AGUAS MACIAS 5 LTS',NULL,NULL,NULL,NULL,NULL,NULL),(13,6,4,'RL TERMICO 80X60X11 (PACK C/10 RL)',NULL,NULL,NULL,NULL,NULL,NULL),(14,2,4,'TAMPA TAKE AWAY 1250 ML(PACK 100 UN)',NULL,NULL,NULL,NULL,NULL,NULL),(15,5,3,'GEL MÃOS ROSA 5L',NULL,NULL,NULL,NULL,NULL,NULL),(16,1,5,'FRALDINHA AUS',NULL,NULL,NULL,NULL,NULL,NULL),(17,1,2,'POLVO NACIONAL 3000/4000 ',NULL,NULL,NULL,NULL,NULL,NULL),(18,1,5,'VAZIA NOVILHO 9',NULL,NULL,NULL,NULL,NULL,NULL),(19,2,1,' PÃO SALOIA',NULL,NULL,NULL,NULL,NULL,NULL),(20,2,6,'QJ F. VACA/OVELHA',NULL,NULL,NULL,NULL,NULL,NULL),(21,2,6,'QJ CURADO 3 MISTURAS',NULL,NULL,NULL,NULL,NULL,NULL),(22,2,6,'QJ CURADO OVELHA NISA',NULL,NULL,NULL,NULL,NULL,NULL),(23,1,13,'FRANGO S/M 10GRN FR',NULL,NULL,NULL,NULL,NULL,NULL),(24,1,14,'FARINHEIRA MCHEF KG',NULL,NULL,NULL,NULL,NULL,NULL),(25,1,14,'CABEÇA DE PORC FUM MCHEF',NULL,NULL,NULL,NULL,NULL,NULL),(26,1,16,'PIMENTO TRICOLOR EMB 500GR',NULL,NULL,NULL,NULL,NULL,NULL),(27,1,16,'CALDO VERDE 200G',NULL,NULL,NULL,NULL,NULL,NULL),(28,1,16,'PIMEN VERDE ASSADO 500G',NULL,NULL,NULL,NULL,NULL,NULL),(29,1,15,'BABA DE CAMELO',NULL,NULL,NULL,NULL,NULL,NULL),(30,1,16,'SALADA IBERICA',NULL,NULL,NULL,NULL,NULL,NULL),(31,1,2,'AMEIJOA JAPONESA',NULL,NULL,NULL,NULL,NULL,NULL),(32,1,2,'TAMBORIL MÉDIO',NULL,NULL,NULL,NULL,NULL,NULL),(33,5,1,'ÓLEO ALMENTAR',NULL,NULL,NULL,NULL,NULL,NULL),(34,2,7,'SUMOL LARANJA LATA 33CL',NULL,NULL,NULL,NULL,NULL,NULL),(35,2,7,'SUMOL ANANAS LATA 33CL',NULL,NULL,NULL,NULL,NULL,NULL),(36,2,7,'SPRITE LATA 33CL',NULL,NULL,NULL,NULL,NULL,NULL),(37,5,7,'COCA COLA PET 1LT',NULL,NULL,NULL,NULL,NULL,NULL),(38,2,7,'TEA LIPTON MANGA 33CL',NULL,NULL,NULL,NULL,NULL,NULL),(39,1,1,'MASSA FETTUCINE 500GR',NULL,NULL,NULL,NULL,NULL,NULL),(40,1,16,'COENTROS',NULL,NULL,NULL,NULL,NULL,NULL),(41,1,16,'TOMATE',NULL,NULL,NULL,NULL,NULL,NULL),(42,1,5,'FRANGO CORACOES',NULL,NULL,NULL,NULL,NULL,NULL),(43,5,1,'NATAS GRESSO  CULINÁRIA 1LT',NULL,NULL,NULL,NULL,NULL,NULL),(44,1,6,'QUEIJO COALHO',NULL,NULL,NULL,NULL,NULL,NULL),(45,1,2,'DOURADA 400/600',NULL,NULL,NULL,NULL,NULL,NULL),(46,1,2,'ROBALO 400/600',NULL,NULL,NULL,NULL,NULL,NULL),(47,1,2,'ROBALO  800/1000',NULL,NULL,NULL,NULL,NULL,NULL),(48,1,2,'SARDINHA',NULL,NULL,NULL,NULL,NULL,NULL),(49,1,6,'BROCOLIS CONG.2,5KG',NULL,NULL,NULL,NULL,NULL,NULL),(50,1,1,'FEIJÃO ENCARNADO  2,55KG',NULL,NULL,NULL,NULL,NULL,NULL),(51,1,1,'PICKLES BALDE 4,5KG',NULL,NULL,NULL,NULL,NULL,NULL),(52,2,7,'ÁGUA C/GÁS FRIZE 25CL',NULL,NULL,NULL,NULL,NULL,NULL),(53,2,7,'ÁGUA C/GÁS PEDRAS  LIMÃO 25CL',NULL,NULL,NULL,NULL,NULL,NULL),(54,2,7,'ÁGUA C/GÁS FRIZE LARANJA 25CL',NULL,NULL,NULL,NULL,NULL,NULL),(55,2,9,'ESPUMANTE MOSCATO ASSO MALVAS 75CL',NULL,NULL,NULL,NULL,NULL,NULL),(56,1,1,'BROA MILHO AMARELO 500G',NULL,NULL,NULL,NULL,NULL,NULL),(57,1,1,'BATATA.CRUNCHY PETAL 2,5KG MCCAIN',NULL,NULL,NULL,NULL,NULL,NULL),(58,1,2,'TIRAS DE POTA PANADAS 1KG',NULL,NULL,NULL,NULL,NULL,NULL),(59,1,1,'ARROZ BASMATI 1KG CIGALA',NULL,NULL,NULL,NULL,NULL,NULL),(60,2,9,'VINHO MADEIRA 75CL',NULL,NULL,NULL,NULL,NULL,NULL),(61,2,4,'RL TERMICO 57X35X11 [PACK C/10RL)',NULL,NULL,NULL,NULL,NULL,NULL),(62,2,3,'HIG.JUMBO RENOVA 90MTS',NULL,NULL,NULL,NULL,NULL,NULL),(63,6,4,'GUARD.DE MESA 40X40 PP AMARELO TORRADO',NULL,NULL,NULL,NULL,NULL,NULL),(64,1,5,'ENTRECOTE BOV.BOTSWANA CONG.',NULL,NULL,NULL,NULL,NULL,NULL),(65,1,1,'MEL FAVO D ABELHA 450GR',NULL,NULL,NULL,NULL,NULL,NULL),(66,2,1,'OVOS M',NULL,NULL,NULL,NULL,NULL,NULL),(67,1,14,'SALSIC.CHURR SORRAIA',NULL,NULL,NULL,NULL,NULL,NULL),(68,1,16,'LIMÃO 3/4',NULL,NULL,NULL,NULL,NULL,NULL),(69,1,1,'OREGAOS',NULL,NULL,NULL,NULL,NULL,NULL),(70,1,16,'BATATA DOCE',NULL,NULL,NULL,NULL,NULL,NULL),(71,1,16,'CENOURA  5KG',NULL,NULL,NULL,NULL,NULL,NULL),(72,1,6,'CREME VEGETAL VAQUEIRO 1KG',NULL,NULL,NULL,NULL,NULL,NULL),(73,5,1,'GELADOO.CAT NATA  4,5LT',NULL,NULL,NULL,NULL,NULL,NULL),(74,1,1,'MOLHO KNORR DEMI GLACE 900GR',NULL,NULL,NULL,NULL,NULL,NULL),(75,5,1,'VINAGRE MCHEF V BCO PET 2LT',NULL,NULL,NULL,NULL,NULL,NULL),(76,5,1,'MOLHO ALHO E ERVAS MCHEF 950ML',NULL,NULL,NULL,NULL,NULL,NULL),(77,6,3,'ROLO MULTIUSOS 2F AZUL',NULL,NULL,NULL,NULL,NULL,NULL),(78,1,6,'PASTA PRESUNTO IBERICO 450G',NULL,NULL,NULL,NULL,NULL,NULL),(79,1,1,'CUBOS EM GELO SC.2KG',NULL,NULL,NULL,NULL,NULL,NULL),(80,1,2,'CONQUILHAS CRUAS 500GR',NULL,NULL,NULL,NULL,NULL,NULL),(81,1,16,'HORTELA 50G',NULL,NULL,NULL,NULL,NULL,NULL),(82,1,16,'ESPARGO VERDE 420GR',NULL,NULL,NULL,NULL,NULL,NULL),(83,2,1,'ÁGUA C/GAS MARACUJÁ 25CL',NULL,NULL,NULL,NULL,NULL,NULL),(84,2,1,'ÁGUA C/GAS TANGERINA  25CL',NULL,NULL,NULL,NULL,NULL,NULL),(85,2,4,'FACA DE S/MESA HOTEL CJ.3',NULL,NULL,NULL,NULL,NULL,NULL),(86,1,1,'TOSTA MINIGRIL NORMAL 350GR',NULL,NULL,NULL,NULL,NULL,NULL),(87,5,1,'MOLHO VINAGRETE 275ML',NULL,NULL,NULL,NULL,NULL,NULL),(88,5,1,'MOLHO PICANTE GALLO',NULL,NULL,NULL,NULL,NULL,NULL),(89,1,16,'MELÃO',NULL,NULL,NULL,NULL,NULL,NULL),(90,1,16,'LARANJA',NULL,NULL,NULL,NULL,NULL,NULL),(91,1,16,'SALADA CAMPONESA',NULL,NULL,NULL,NULL,NULL,NULL),(92,5,1,'LEITE UHT GORDO LT',NULL,NULL,NULL,NULL,NULL,NULL),(93,1,2,'CARAPAU MEDIO',NULL,NULL,NULL,NULL,NULL,NULL),(94,1,2,'DOURADA  800+1000',NULL,NULL,NULL,NULL,NULL,NULL),(95,1,5,'PORCO PRETO TIRAS ENTRECOSTO KG',NULL,NULL,NULL,NULL,NULL,NULL),(96,6,1,'ACENDALHA BCO 32 CUBOS',NULL,NULL,NULL,NULL,NULL,NULL),(97,1,15,'TOPPING CARAMELO CALDA 1.300KG',NULL,NULL,NULL,NULL,NULL,NULL),(98,5,1,'MOLHO BARBECUE 950ML',NULL,NULL,NULL,NULL,NULL,NULL),(99,3,10,'COCKTAIL LEQQ BLUE LAGOON 33CL',NULL,NULL,NULL,NULL,NULL,NULL),(100,3,10,'COCKTAIL LECOQ MARGARITA 33CL',NULL,NULL,NULL,NULL,NULL,NULL),(101,3,10,'COCKTAIL LECOQ PINA COLADA 33CL',NULL,NULL,NULL,NULL,NULL,NULL),(102,1,15,'CHEESECAKE MOR.1.100KG',NULL,NULL,NULL,NULL,NULL,NULL),(103,2,6,'CARPACCIO',NULL,NULL,NULL,NULL,NULL,NULL),(104,2,3,'SACOS LIXO 10X100LT',NULL,NULL,NULL,NULL,NULL,NULL),(105,2,4,'GARFO DE S/MESA HOTEL CJ.6',NULL,NULL,NULL,NULL,NULL,NULL),(106,1,16,'GOIABA',NULL,NULL,NULL,NULL,NULL,NULL),(107,3,1,'PIRI-PIRI',NULL,NULL,NULL,NULL,NULL,NULL),(108,1,16,'RUCULA SELVAGEM',NULL,NULL,NULL,NULL,NULL,NULL),(109,1,2,'PREGADO 600+800',NULL,NULL,NULL,NULL,NULL,NULL),(110,1,6,'CAMARÃO 20/30',NULL,NULL,NULL,NULL,NULL,NULL),(111,5,1,'OLEO ALTO RENDIMENTO 10LT',NULL,NULL,NULL,NULL,NULL,NULL),(112,2,10,'CER S/A SAGRES 0.0% 33CL',NULL,NULL,NULL,NULL,NULL,NULL),(113,3,9,'ESPUMANTE MOSCATO ASSO MALVAS 75CL',NULL,NULL,NULL,NULL,NULL,NULL),(114,5,9,'V.LAGAR MOIRAS BIB BC 5LT',NULL,NULL,NULL,NULL,NULL,NULL),(115,1,15,'TOUCINHO DO CÉU 1000GR',NULL,NULL,NULL,NULL,NULL,NULL),(116,1,6,'MÃOS PORCO SALGADAS',NULL,NULL,NULL,NULL,NULL,NULL),(117,1,6,'FOCINHO DE PORCO SALGADO',NULL,NULL,NULL,NULL,NULL,NULL),(118,1,14,'CHOURIÇO DE SANGUE SAQUETA',NULL,NULL,NULL,NULL,NULL,NULL),(119,1,16,'COUVE BRANCA 1KG',NULL,NULL,NULL,NULL,NULL,NULL),(120,1,16,'NABO S/RAMA 80/100',NULL,NULL,NULL,NULL,NULL,NULL),(121,1,1,'TREMOCO 12/15 BL 3KG',NULL,NULL,NULL,NULL,NULL,NULL),(122,1,14,'CHOURIÇO DE CARNE',NULL,NULL,NULL,NULL,NULL,NULL),(123,1,5,'COSTELETA DO CACHAÇO SUINO',NULL,NULL,NULL,NULL,NULL,NULL),(124,1,5,'ENTREMEADA FAT.SUINO',NULL,NULL,NULL,NULL,NULL,NULL),(125,1,5,'TIRA ENTRECOTE PORCO',NULL,NULL,NULL,NULL,NULL,NULL),(126,1,2,'SALMÃO NORUEGA',NULL,NULL,NULL,NULL,NULL,NULL),(127,1,16,'SALSA 50G',NULL,NULL,NULL,NULL,NULL,NULL),(128,1,1,'GRÃO DE BICO LT 2,6KG',NULL,NULL,NULL,NULL,NULL,NULL),(129,1,15,'DELICIA DE COCO 1500G',NULL,NULL,NULL,NULL,NULL,NULL),(130,6,4,'SACO VAC PK 36 8X20 2CM',NULL,NULL,NULL,NULL,NULL,NULL),(131,1,1,'POLPA DE TOMATE COMPAL 1KG',NULL,NULL,NULL,NULL,NULL,NULL),(132,1,5,'PORCO CAHAÇO S/OSSO KG',NULL,NULL,NULL,NULL,NULL,NULL),(133,2,15,'GELADO CONES ',NULL,NULL,NULL,NULL,NULL,NULL),(134,2,15,'GELADO FRESK',NULL,NULL,NULL,NULL,NULL,NULL),(135,1,5,'PREPARADO P/COZIDO ORELHA',NULL,NULL,NULL,NULL,NULL,NULL),(136,1,5,'CARNE MISTA P/COZIDO',NULL,NULL,NULL,NULL,NULL,NULL),(137,1,5,'MÃO VITELA(MÃO DE VACA) 2.5KG',NULL,NULL,NULL,NULL,NULL,NULL);

--
-- Table structure for table `produto_entrada`
--

CREATE TABLE `produto_entrada` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `produto_id` int(11) NOT NULL,
  `entrada_id` int(11) NOT NULL,
  `qtd` double NOT NULL,
  `total` double NOT NULL,
  `valor` double NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_produto_entrada_1_1` (`produto_id`),
  KEY `fk_produto_entrada_2_2` (`entrada_id`),
  CONSTRAINT `fk_produto_entrada_1_1` FOREIGN KEY (`produto_id`) REFERENCES `produto` (`id`),
  CONSTRAINT `fk_produto_entrada_2_2` FOREIGN KEY (`entrada_id`) REFERENCES `entrada` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `produto_entrada`
--


--
-- Table structure for table `system_document`
--

CREATE TABLE `system_document` (
  `id` int(11) NOT NULL,
  `system_user_id` int(11) DEFAULT NULL,
  `title` text NOT NULL,
  `description` text DEFAULT NULL,
  `category_id` int(11) NOT NULL,
  `submission_date` date DEFAULT NULL,
  `archive_date` date DEFAULT NULL,
  `filename` text DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `category_id` (`category_id`),
  KEY `fk_system_document_system_user_id` (`system_user_id`),
  CONSTRAINT `fk_system_document_system_user_id` FOREIGN KEY (`system_user_id`) REFERENCES `system_users` (`id`),
  CONSTRAINT `system_document_ibfk_1` FOREIGN KEY (`category_id`) REFERENCES `system_document_category` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `system_document`
--


--
-- Table structure for table `system_document_category`
--

CREATE TABLE `system_document_category` (
  `id` int(11) NOT NULL,
  `name` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `system_document_category`
--

INSERT INTO `system_document_category` (`id`, `name`) VALUES (1,'Documentação');

--
-- Table structure for table `system_document_group`
--

CREATE TABLE `system_document_group` (
  `id` int(11) NOT NULL,
  `document_id` int(11) NOT NULL,
  `system_group_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `document_id` (`document_id`),
  KEY `fk_system_document_group_system_group_id` (`system_group_id`),
  CONSTRAINT `fk_system_document_group_system_group_id` FOREIGN KEY (`system_group_id`) REFERENCES `system_group` (`id`),
  CONSTRAINT `system_document_group_ibfk_1` FOREIGN KEY (`document_id`) REFERENCES `system_document` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `system_document_group`
--


--
-- Table structure for table `system_document_user`
--

CREATE TABLE `system_document_user` (
  `id` int(11) NOT NULL,
  `document_id` int(11) NOT NULL,
  `system_user_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `document_id` (`document_id`),
  KEY `fk_system_document_user_system_user_id` (`system_user_id`),
  CONSTRAINT `fk_system_document_user_system_user_id` FOREIGN KEY (`system_user_id`) REFERENCES `system_users` (`id`),
  CONSTRAINT `system_document_user_ibfk_1` FOREIGN KEY (`document_id`) REFERENCES `system_document` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `system_document_user`
--


--
-- Table structure for table `system_group`
--

CREATE TABLE `system_group` (
  `id` int(11) NOT NULL,
  `name` text NOT NULL,
  `uuid` varchar(36) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `system_group`
--

INSERT INTO `system_group` (`id`, `name`, `uuid`) VALUES (1,'Admin',NULL),(2,'Standard',NULL),(3,'BChat Interno',NULL),(4,'Gestão de Despesas','499469ce-9abf-474f-aaee-d4448d0783ea'),(5,'BChat Interno','87fda867-44a5-4520-8a55-5a07596d6d2e');

--
-- Table structure for table `system_group_program`
--

CREATE TABLE `system_group_program` (
  `id` int(11) NOT NULL,
  `system_group_id` int(11) NOT NULL,
  `system_program_id` int(11) NOT NULL,
  `actions` text DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `sys_group_program_program_idx` (`system_program_id`),
  KEY `sys_group_program_group_idx` (`system_group_id`),
  CONSTRAINT `system_group_program_ibfk_1` FOREIGN KEY (`system_group_id`) REFERENCES `system_group` (`id`),
  CONSTRAINT `system_group_program_ibfk_2` FOREIGN KEY (`system_program_id`) REFERENCES `system_program` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `system_group_program`
--

INSERT INTO `system_group_program` (`id`, `system_group_id`, `system_program_id`, `actions`) VALUES (1,1,1,NULL),(2,1,2,NULL),(3,1,3,NULL),(4,1,4,NULL),(5,1,5,NULL),(6,1,6,NULL),(7,1,8,NULL),(8,1,9,NULL),(9,1,11,NULL),(10,1,14,NULL),(11,1,15,NULL),(12,2,10,NULL),(13,2,12,NULL),(14,2,13,NULL),(15,2,16,NULL),(16,2,17,NULL),(17,2,18,NULL),(18,2,19,NULL),(19,2,20,NULL),(20,1,21,NULL),(21,2,22,NULL),(22,2,23,NULL),(23,2,24,NULL),(24,2,25,NULL),(25,1,26,NULL),(26,1,27,NULL),(27,1,28,NULL),(28,1,29,NULL),(29,2,30,NULL),(30,1,31,NULL),(31,1,32,NULL),(32,1,33,NULL),(33,1,34,NULL),(34,1,35,NULL),(36,1,36,NULL),(37,1,37,NULL),(38,1,38,NULL),(39,1,39,NULL),(40,1,40,NULL),(41,1,41,NULL),(42,1,42,NULL),(43,1,46,NULL),(44,1,47,NULL),(45,3,43,NULL),(46,3,44,NULL),(47,3,45,NULL),(48,4,48,NULL),(49,4,49,NULL),(50,4,50,NULL),(51,4,51,NULL),(52,4,52,NULL),(53,4,53,NULL),(54,4,54,NULL),(55,4,55,NULL),(56,4,56,NULL),(57,4,57,NULL),(58,4,58,NULL),(59,4,59,NULL),(60,4,60,NULL),(61,4,61,NULL),(62,4,62,NULL);

--
-- Table structure for table `system_message`
--

CREATE TABLE `system_message` (
  `id` int(11) NOT NULL,
  `system_user_id` int(11) NOT NULL,
  `system_user_to_id` int(11) NOT NULL,
  `subject` text NOT NULL,
  `message` text DEFAULT NULL,
  `dt_message` datetime DEFAULT NULL,
  `checked` char(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_system_message_system_user_id` (`system_user_id`),
  KEY `fk_system_message_system_user_to_id` (`system_user_to_id`),
  CONSTRAINT `fk_system_message_system_user_id` FOREIGN KEY (`system_user_id`) REFERENCES `system_users` (`id`),
  CONSTRAINT `fk_system_message_system_user_to_id` FOREIGN KEY (`system_user_to_id`) REFERENCES `system_users` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `system_message`
--


--
-- Table structure for table `system_notification`
--

CREATE TABLE `system_notification` (
  `id` int(11) NOT NULL,
  `system_user_id` int(11) NOT NULL,
  `system_user_to_id` int(11) NOT NULL,
  `subject` text DEFAULT NULL,
  `message` text DEFAULT NULL,
  `dt_message` datetime DEFAULT NULL,
  `action_url` text DEFAULT NULL,
  `action_label` text DEFAULT NULL,
  `icon` text DEFAULT NULL,
  `checked` char(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_system_notification_system_user_id` (`system_user_id`),
  KEY `fk_system_notification_system_user_to_id` (`system_user_to_id`),
  CONSTRAINT `fk_system_notification_system_user_id` FOREIGN KEY (`system_user_id`) REFERENCES `system_users` (`id`),
  CONSTRAINT `fk_system_notification_system_user_to_id` FOREIGN KEY (`system_user_to_id`) REFERENCES `system_users` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `system_notification`
--


--
-- Table structure for table `system_preference`
--

CREATE TABLE `system_preference` (
  `id` varchar(255) NOT NULL,
  `preference` text DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `system_preference`
--

INSERT INTO `system_preference` (`id`, `preference`) VALUES ('1_user_datagrid_properties','{\"DespesasList\":{\"hideColumns\":[],\"pageLimit\":10},\"EntradaList\":{\"hideColumns\":[],\"pageLimit\":10}}'),('builder_user_themes','{\"1\":\"layout_branco\"}');

--
-- Table structure for table `system_program`
--

CREATE TABLE `system_program` (
  `id` int(11) NOT NULL,
  `name` text NOT NULL,
  `controller` text NOT NULL,
  `actions` text DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `system_program`
--

INSERT INTO `system_program` (`id`, `name`, `controller`, `actions`) VALUES (1,'System Group Form','SystemGroupForm',NULL),(2,'System Group List','SystemGroupList',NULL),(3,'System Program Form','SystemProgramForm',NULL),(4,'System Program List','SystemProgramList',NULL),(5,'System User Form','SystemUserForm',NULL),(6,'System User List','SystemUserList',NULL),(7,'Common Page','CommonPage',NULL),(8,'System PHP Info','SystemPHPInfoView',NULL),(9,'System ChangeLog View','SystemChangeLogView',NULL),(10,'Welcome View','WelcomeView',NULL),(11,'System Sql Log','SystemSqlLogList',NULL),(12,'System Profile View','SystemProfileView',NULL),(13,'System Profile Form','SystemProfileForm',NULL),(14,'System SQL Panel','SystemSQLPanel',NULL),(15,'System Access Log','SystemAccessLogList',NULL),(16,'System Message Form','SystemMessageForm',NULL),(17,'System Message List','SystemMessageList',NULL),(18,'System Message Form View','SystemMessageFormView',NULL),(19,'System Notification List','SystemNotificationList',NULL),(20,'System Notification Form View','SystemNotificationFormView',NULL),(21,'System Document Category List','SystemDocumentCategoryFormList',NULL),(22,'System Document Form','SystemDocumentForm',NULL),(23,'System Document Upload Form','SystemDocumentUploadForm',NULL),(24,'System Document List','SystemDocumentList',NULL),(25,'System Shared Document List','SystemSharedDocumentList',NULL),(26,'System Unit Form','SystemUnitForm',NULL),(27,'System Unit List','SystemUnitList',NULL),(28,'System Access stats','SystemAccessLogStats',NULL),(29,'System Preference form','SystemPreferenceForm',NULL),(30,'System Support form','SystemSupportForm',NULL),(31,'System PHP Error','SystemPHPErrorLogView',NULL),(32,'System Database Browser','SystemDatabaseExplorer',NULL),(33,'System Table List','SystemTableList',NULL),(34,'System Data Browser','SystemDataBrowser',NULL),(35,'System Menu Editor','SystemMenuEditor',NULL),(36,'System Request Log','SystemRequestLogList',NULL),(37,'System Request Log View','SystemRequestLogView',NULL),(38,'System Administration Dashboard','SystemAdministrationDashboard',NULL),(39,'System Log Dashboard','SystemLogDashboard',NULL),(40,'System Session dump','SystemSessionDumpView',NULL),(41,'System files diff','SystemFilesDiff',NULL),(42,'System Information','SystemInformationView',NULL),(43,'Form to add user to chat group','SystemAddUserGroupForm',NULL),(44,'Form to start a chat','SystemNewChatForm',NULL),(45,'Form to start a group chat','SystemNewChatGroupForm',NULL),(46,'System monitor online users list','SystemUserMonitorHeaderList',NULL),(47,'System Data Import','SystemDataImportForm',NULL),(48,'Fornecedores','FornecedorList',NULL),(49,'Despesass','DespesasList',NULL),(50,'Cadastro de fornecedor','FornecedorForm',NULL),(51,'Cadastro de despesas','DespesasForm',NULL),(52,'Dashboard','dashboard',NULL),(53,'Relatório de despesas','DespesasReport',NULL),(54,'Produtos','ProdutoList',NULL),(55,'Produtos','ProdutoForm',NULL),(56,'Categoria','CategoriaForm',NULL),(57,'Cadastro de entrada','EntradaForm',NULL),(58,'Entradas','EntradaList',NULL),(59,'Categorias','CategoriaList',NULL),(60,'Produto entrada','ProdutoEntradaForm',NULL),(61,'Produto entrada','ProdutoEntradaSimpleList',NULL),(62,'Relatório de produtos','EProdutocategoriaReport',NULL);

--
-- Table structure for table `system_unit`
--

CREATE TABLE `system_unit` (
  `id` int(11) NOT NULL,
  `name` text NOT NULL,
  `connection_name` text DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `system_unit`
--


--
-- Table structure for table `system_user_group`
--

CREATE TABLE `system_user_group` (
  `id` int(11) NOT NULL,
  `system_user_id` int(11) NOT NULL,
  `system_group_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `sys_user_group_group_idx` (`system_group_id`),
  KEY `sys_user_group_user_idx` (`system_user_id`),
  CONSTRAINT `system_user_group_ibfk_1` FOREIGN KEY (`system_user_id`) REFERENCES `system_users` (`id`),
  CONSTRAINT `system_user_group_ibfk_2` FOREIGN KEY (`system_group_id`) REFERENCES `system_group` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `system_user_group`
--

INSERT INTO `system_user_group` (`id`, `system_user_id`, `system_group_id`) VALUES (2,2,2),(6,3,2),(7,3,4),(8,1,1),(9,1,2),(10,1,3),(11,1,4);

--
-- Table structure for table `system_user_program`
--

CREATE TABLE `system_user_program` (
  `id` int(11) NOT NULL,
  `system_user_id` int(11) NOT NULL,
  `system_program_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `sys_user_program_program_idx` (`system_program_id`),
  KEY `sys_user_program_user_idx` (`system_user_id`),
  CONSTRAINT `system_user_program_ibfk_1` FOREIGN KEY (`system_user_id`) REFERENCES `system_users` (`id`),
  CONSTRAINT `system_user_program_ibfk_2` FOREIGN KEY (`system_program_id`) REFERENCES `system_program` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `system_user_program`
--

INSERT INTO `system_user_program` (`id`, `system_user_id`, `system_program_id`) VALUES (1,2,7);

--
-- Table structure for table `system_user_unit`
--

CREATE TABLE `system_user_unit` (
  `id` int(11) NOT NULL,
  `system_user_id` int(11) NOT NULL,
  `system_unit_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `system_user_id` (`system_user_id`),
  KEY `system_unit_id` (`system_unit_id`),
  CONSTRAINT `system_user_unit_ibfk_1` FOREIGN KEY (`system_user_id`) REFERENCES `system_users` (`id`),
  CONSTRAINT `system_user_unit_ibfk_2` FOREIGN KEY (`system_unit_id`) REFERENCES `system_unit` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `system_user_unit`
--


--
-- Table structure for table `unidade`
--

CREATE TABLE `unidade` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nome` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `unidade`
--

INSERT INTO `unidade` (`id`, `nome`) VALUES (1,'Quilo'),(2,'Unidade'),(3,'Garrafa'),(4,'Lata'),(5,'Litro'),(6,'Pacote'),(7,'Saco'),(8,'Caixa');

--
-- Dumping events for database 'noss2142_galetobia'
--

--
-- Dumping routines for database 'noss2142_galetobia'
--


