/*
SQLyog Ultimate v13.1.1 (64 bit)
MySQL - 5.7.33 : Database - alcanced_jobis
*********************************************************************
*/

/*!40101 SET NAMES utf8 */;

/*!40101 SET SQL_MODE=''*/;

/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`alcanced_jobis` /*!40100 DEFAULT CHARACTER SET latin1 */;

USE `alcanced_jobis`;

/*Table structure for table `produto` */

DROP TABLE IF EXISTS `produto`;

CREATE TABLE `produto` (
  `id_produto` int(11) NOT NULL AUTO_INCREMENT,
  `nome_produto` varchar(40) DEFAULT NULL,
  `minimo_produto` float DEFAULT NULL,
  PRIMARY KEY (`id_produto`)
) ENGINE=InnoDB AUTO_INCREMENT=148 DEFAULT CHARSET=latin1;

/*Table structure for table `produto_estoque` */

DROP TABLE IF EXISTS `produto_estoque`;

CREATE TABLE `produto_estoque` (
  `id_produto_estoque` int(11) NOT NULL AUTO_INCREMENT,
  `idprodutoproduto_estoque` int(11) DEFAULT NULL,
  `estoque_produto_estoque` double(15,2) DEFAULT NULL,
  `data_produto_estoque` datetime DEFAULT NULL,
  `tipo_produto_estoque` varchar(15) DEFAULT NULL,
  PRIMARY KEY (`id_produto_estoque`)
) ENGINE=InnoDB AUTO_INCREMENT=148 DEFAULT CHARSET=latin1;

/*Table structure for table `produto_fornecedor` */

DROP TABLE IF EXISTS `produto_fornecedor`;

CREATE TABLE `produto_fornecedor` (
  `id_produto_fornecedor` int(11) NOT NULL AUTO_INCREMENT,
  `idfor_produto_fornecedor` int(11) DEFAULT NULL,
  `idprod_produto_fornecedor` int(11) DEFAULT NULL,
  PRIMARY KEY (`id_produto_fornecedor`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Table structure for table `produto_imagens` */

DROP TABLE IF EXISTS `produto_imagens`;

CREATE TABLE `produto_imagens` (
  `id_produto_imagens` int(11) NOT NULL AUTO_INCREMENT,
  `idprod_produto_imagens` int(11) DEFAULT NULL,
  `arq_produto_imagens` longtext,
  PRIMARY KEY (`id_produto_imagens`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Table structure for table `produto_inventario` */

DROP TABLE IF EXISTS `produto_inventario`;

CREATE TABLE `produto_inventario` (
  `id_produto_inventario` int(11) NOT NULL AUTO_INCREMENT,
  `idprod_produto_inventario` int(11) DEFAULT NULL,
  `motivo_produto_inventario` varchar(40) DEFAULT NULL,
  `data_produto_inventario` datetime DEFAULT NULL,
  `tipo_produto_inventario` varchar(10) DEFAULT NULL,
  `ajuste_produto_inventario` float DEFAULT NULL,
  `estoque_produto_inventario` float DEFAULT NULL,
  PRIMARY KEY (`id_produto_inventario`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Table structure for table `produto_sub` */

DROP TABLE IF EXISTS `produto_sub`;

CREATE TABLE `produto_sub` (
  `id_produto_sub` int(11) NOT NULL AUTO_INCREMENT,
  `idproduto_produto_sub` int(11) DEFAULT NULL,
  `idclasse_produto_sub` int(11) DEFAULT NULL,
  `codbarras_produto_sub` varchar(60) DEFAULT NULL,
  `desc_produto_sub` varchar(40) DEFAULT NULL,
  `sigla_produto_sub` varchar(4) DEFAULT NULL,
  `tipo_produto_sub` varchar(60) DEFAULT NULL,
  `cfop_produto_sub` varchar(8) DEFAULT NULL,
  `ncm_produto_sub` varchar(8) DEFAULT NULL,
  `valor_produto_sub` float DEFAULT NULL,
  `baixa_produto_sub` float DEFAULT NULL,
  `natureza_produto_sub` int(1) DEFAULT NULL,
  PRIMARY KEY (`id_produto_sub`)
) ENGINE=InnoDB AUTO_INCREMENT=148 DEFAULT CHARSET=latin1;

/*Table structure for table `siglas` */

DROP TABLE IF EXISTS `siglas`;

CREATE TABLE `siglas` (
  `id_siglas` int(11) NOT NULL AUTO_INCREMENT,
  `legenda_siglas` varchar(3) DEFAULT NULL,
  `descricao_siglas` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`id_siglas`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Table structure for table `vendas` */

DROP TABLE IF EXISTS `vendas`;

CREATE TABLE `vendas` (
  `id_vendas` int(11) NOT NULL AUTO_INCREMENT,
  `idcaixa_vendas` int(11) DEFAULT NULL,
  `idcliente_vendas` int(11) NOT NULL,
  `idtrans_vendas` int(11) NOT NULL,
  `vtrans_vendas` float DEFAULT NULL,
  `data_vendas` datetime NOT NULL,
  `dataf_vendas` datetime DEFAULT NULL,
  `valor_vendas` float DEFAULT NULL,
  `tipoen_vendas` varchar(20) DEFAULT NULL,
  `status_vendas` varchar(20) NOT NULL,
  `iduser_vendas` int(11) NOT NULL,
  `juros_vendas` float DEFAULT NULL,
  `desconto_vendas` float DEFAULT NULL,
  `total_vendas` float DEFAULT NULL,
  `notas_vendas` varchar(20) DEFAULT NULL,
  `obs_vendas` varchar(200) DEFAULT NULL,
  `avaliacao_vendas` int(1) DEFAULT NULL,
  `agenda_vendas` datetime DEFAULT NULL,
  PRIMARY KEY (`id_vendas`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

/*Table structure for table `vendas_itens` */

DROP TABLE IF EXISTS `vendas_itens`;

CREATE TABLE `vendas_itens` (
  `id_vendas_itens` int(11) NOT NULL AUTO_INCREMENT,
  `idvendas_vendas_itens` int(11) NOT NULL,
  `idproduto_vendas_itens` int(11) NOT NULL,
  `descricao_vendas_itens` varchar(80) NOT NULL,
  `qtd_vendas_itens` float NOT NULL,
  `sigla_vendas_itens` varchar(3) DEFAULT NULL,
  `unitario_vendas_itens` float NOT NULL,
  `desconto_vendas_itens` float DEFAULT NULL,
  `impostos_vendas_itens` float DEFAULT NULL,
  `total_vendas_itens` float NOT NULL,
  `serie_vendas_itens` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`id_vendas_itens`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

/*Table structure for table `vendas_pagamentos` */

DROP TABLE IF EXISTS `vendas_pagamentos`;

CREATE TABLE `vendas_pagamentos` (
  `id_vendas_pagamentos` int(11) NOT NULL AUTO_INCREMENT,
  `idvendas_vendas_pagamentos` int(11) DEFAULT NULL,
  `idcaixa_vendas_pagamentos` int(11) DEFAULT NULL,
  `valor_vendas_pagamentos` float DEFAULT NULL,
  `tipo_vendas_pagamentos` varchar(20) DEFAULT NULL,
  `credito_vendas_pagamentos` date DEFAULT NULL,
  PRIMARY KEY (`id_vendas_pagamentos`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
