-- --------------------------------------------------------
-- Server OS:                    Win64
-- HeidiSQL Version:             11.2.0.6213
-- --------------------------------------------------------


-- Dumping structure for table kyendaweb.artigos
CREATE TABLE IF NOT EXISTS `artigos` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL,
  `categoria_id` int(10) unsigned NOT NULL,
  `nome_operador` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `dosagem` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `forma_farm` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `cod_artigo` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `nome_artigo` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `stok` int(11) NOT NULL,
  `p_venda` int(26) DEFAULT NULL,
  `imagem` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `descricao` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `estado_artigo` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `artigos_user_id_foreign` (`user_id`),
  KEY `artigos_categoria_id_foreign` (`categoria_id`),
  CONSTRAINT `artigos_categoria_id_foreign` FOREIGN KEY (`categoria_id`) REFERENCES `categoria` (`id`),
  CONSTRAINT `artigos_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table kyendaweb.artigos: ~7 rows (approximately)
INSERT INTO `artigos` (`id`, `user_id`, `categoria_id`, `nome_operador`, `dosagem`, `forma_farm`, `cod_artigo`, `nome_artigo`, `stok`, `p_venda`, `imagem`, `descricao`, `estado_artigo`, `created_at`, `updated_at`) VALUES
	(1, 1, 1, 'Marcial Mbango', '500mg', 'Pomada', '313588501', 'Creme Lauroderme', 39, 3600, 'imp-eltron-zebra-zxp3-cartes-standart.jpg', 'Creme Lauroderme para pel', 'Activo', '2018-08-02 12:14:18', '2019-01-12 16:45:19'),
	(2, 1, 1, 'Marcial Mbango', '1 Kg', 'Solucao', '822367977', 'Serelac de frutas', 13, 5454, 'imp-eltron-zxp-7-zebra-colusbnetds.jpg', 'SD', 'Activo', '2018-08-02 21:11:18', '2019-01-12 16:45:10'),
	(3, 1, 1, 'Marcial Mbango', '500ml', 'Pomada', '1111539331', 'Pomada Lauroderme', 47, 3000, 'impressora-zebra-p430i-p430-carto-pvc-crachas-frente-verso-D_NQ_NP_20868-MLB20199188726_112014-F.jpg', 'SD', 'Activo', '2018-08-02 22:48:21', '2019-01-12 16:45:01'),
	(4, 1, 1, 'Marcial Mbango', '600mg', 'Xarope', '2117195681', 'Paracetamol2', 5, 250, 'imp-eltron-zebra-zxp3-cartes-impress.jpg', 'pedriatico', 'Activo', '2018-08-16 10:46:45', '2019-01-12 21:15:23'),
	(5, 1, 1, 'Marcial Mbango', '600mg', 'Xarope', '1853821631', 'Cesto', 14, 150, 'ag.jpg', 'Cesto de escritório', 'Activo', '2020-01-21 17:22:26', '2020-01-21 17:23:20'),
	(6, 1, 10, 'Marcial Mbango', '525mg', 'Fc', '1838785984', 'Giz', 48, 300, 'virtualizacion1.jpg', 'Giz', 'Activo', '2020-01-21 17:27:20', '2020-01-21 17:27:20'),
	(7, 1, 10, 'Marcial Mbango', '250mg', 'Rolo', '1369375336', 'Caderno Angola', 97, 150, 'Imagem', 'Caderno Angola', 'Activo', '2020-01-21 17:32:23', '2020-01-21 17:32:23');

-- Dumping structure for table kyendaweb.categoria
CREATE TABLE IF NOT EXISTS `categoria` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL,
  `nome_operador` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `nome_cat` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `descricao` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `condicao` tinyint(1) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `categoria_user_id_foreign` (`user_id`),
  CONSTRAINT `categoria_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table kyendaweb.categoria: ~10 rows (approximately)
INSERT INTO `categoria` (`id`, `user_id`, `nome_operador`, `nome_cat`, `descricao`, `condicao`, `created_at`, `updated_at`) VALUES
	(1, 1, 'Marcial Mbango', 'Cosmetico', 'Cosmeticos Angolanos', 1, '2018-08-02 11:46:29', '2018-08-02 11:46:29'),
	(2, 1, 'Marcial Mbango', 'Farmacos', 'Farmacos portugueses', 1, '2018-08-02 11:47:00', '2018-08-02 11:52:44'),
	(3, 1, 'Marcial Mbango', 'Prto', 'prot', 0, '2018-08-02 11:47:45', '2018-08-02 11:47:55'),
	(4, 1, 'Marcial Mbango', 'testes', 'sem comentarios', 0, '2018-08-02 11:53:01', '2018-08-02 11:53:21'),
	(5, 1, 'Marcial Mbango', 'Alimentos', 'Sem descricao', 1, '2018-08-02 21:02:44', '2018-08-02 21:02:44'),
	(6, 1, 'Marcial Mbango', 'Diversos itens', 'SD', 1, '2018-08-02 22:46:14', '2018-08-02 22:46:27'),
	(7, 1, 'Marcial Mbango', 'uiiiou', 'uoio', 0, '2018-08-02 22:46:44', '2018-08-02 22:46:49'),
	(8, 1, 'Marcial Mbango', 'venda', 'sd', 0, '2018-09-08 17:24:09', '2018-09-08 17:29:32'),
	(9, 1, 'Marcial Mbango', 'Material de escritório', 'Material de escritório diversos', 1, '2020-01-21 17:16:32', '2020-01-21 17:16:32'),
	(10, 1, 'Marcial Mbango', 'Material escolar', 'Material escolar divcerso', 1, '2020-01-21 17:25:57', '2020-01-21 17:25:57');

-- Dumping structure for table kyendaweb.entradas
CREATE TABLE IF NOT EXISTS `entradas` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `pessoa_id` int(10) unsigned NOT NULL,
  `nome_pessoa` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `recibo` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `serie` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `numero` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `imposto` double(8,2) NOT NULL,
  `estado` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `entradas_pessoa_id_foreign` (`pessoa_id`),
  CONSTRAINT `entradas_pessoa_id_foreign` FOREIGN KEY (`pessoa_id`) REFERENCES `pessoa` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table kyendaweb.entradas: ~8 rows (approximately)
INSERT INTO `entradas` (`id`, `pessoa_id`, `nome_pessoa`, `recibo`, `serie`, `numero`, `imposto`, `estado`, `created_at`, `updated_at`) VALUES
	(2, 2, 'Coster', '3171-02-08-2018', '08-2018', '23456', 18.00, 'A', '2018-08-02 21:17:35', '2018-08-02 21:17:35'),
	(3, 3, 'Coster', '3171-02-08-2018', '08-2018', '23456', 18.00, 'A', '2018-08-02 21:22:46', '2018-08-02 21:22:46'),
	(4, 4, 'Coster', '3171-02-08-2018', '08-2018', '23456', 18.00, 'A', '2018-08-02 21:24:26', '2018-08-02 21:24:26'),
	(5, 10, 'SD', '1215-02-08-2018', '08-2018', '2134', 18.00, 'A', '2018-08-02 22:02:24', '2018-08-02 22:02:24'),
	(6, 12, 'DE', '8955-02-08-2018', '08-2018', '123456', 18.00, 'A', '2018-08-02 22:50:29', '2018-08-02 22:50:29'),
	(7, 14, 'ggdgfs', '8503-12-01-2019', '01-2019', '4433', 18.00, 'A', '2019-01-12 16:31:49', '2019-01-12 16:31:49'),
	(8, 18, 'Qnb', '5922-04-05-2019', '05-2019', '1234566789', 18.00, 'A', '2019-05-04 12:17:14', '2019-05-04 12:17:14'),
	(9, 23, 'Novo', '2532-21-01-2020', '01-2020', '45687', 18.00, 'A', '2020-01-21 17:36:15', '2020-01-21 17:36:15');

-- Dumping structure for table kyendaweb.entrada_artigo
CREATE TABLE IF NOT EXISTS `entrada_artigo` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `artigo_id` int(10) unsigned NOT NULL,
  `entrada_id` int(10) unsigned NOT NULL,
  `dosagem` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `forma_farm` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `qntidad` int(11) NOT NULL,
  `p_compra` double(8,2) NOT NULL,
  `p_venda` double(8,2) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `entrada_artigo_artigo_id_foreign` (`artigo_id`),
  KEY `entrada_artigo_entrada_id_foreign` (`entrada_id`),
  CONSTRAINT `entrada_artigo_artigo_id_foreign` FOREIGN KEY (`artigo_id`) REFERENCES `artigos` (`id`),
  CONSTRAINT `entrada_artigo_entrada_id_foreign` FOREIGN KEY (`entrada_id`) REFERENCES `entradas` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table kyendaweb.entrada_artigo: ~8 rows (approximately)
INSERT INTO `entrada_artigo` (`id`, `artigo_id`, `entrada_id`, `dosagem`, `forma_farm`, `qntidad`, `p_compra`, `p_venda`, `created_at`, `updated_at`) VALUES
	(1, 2, 4, '1', '3', 1, 2.00, 4.00, '2018-08-02 21:24:26', '2018-08-02 21:24:26'),
	(2, 1, 5, '1', '3', 10, 2500.00, 3600.00, '2018-08-02 22:02:24', '2018-08-02 22:02:24'),
	(3, 3, 6, '1', '3', 2, 2000.00, 3000.00, '2018-08-02 22:50:29', '2018-08-02 22:50:29'),
	(4, 2, 7, '1', '3', 3, 4566.00, 5454.00, '2019-01-12 16:31:50', '2019-01-12 16:31:50'),
	(5, 4, 8, '1', '3', 3, 200.00, 250.00, '2019-05-04 12:17:14', '2019-05-04 12:17:14'),
	(6, 7, 9, '1', '3', 100, 100.00, 150.00, '2020-01-21 17:36:15', '2020-01-21 17:36:15'),
	(7, 6, 9, '2', 'm', 47, 250.00, 300.00, '2020-01-21 17:36:15', '2020-01-21 17:36:15'),
	(8, 5, 9, 'm', 'm', 2, 1000.00, 150.00, '2020-01-21 17:36:16', '2020-01-21 17:36:16');

-- Dumping structure for table kyendaweb.migrations
CREATE TABLE IF NOT EXISTS `migrations` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `migration` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table kyendaweb.migrations: ~12 rows (approximately)
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
	(1, '2014_10_12_000000_create_users_table', 1),
	(2, '2014_10_12_100000_create_password_resets_table', 1),
	(3, '2017_03_12_084652_create_categoria_table', 1),
	(4, '2017_03_12_085226_create_artigos_table', 1),
	(5, '2017_03_12_091248_create_pessoa_table', 1),
	(6, '2017_03_12_092948_create_entradas_table', 1),
	(7, '2017_03_12_094725_create_entrada_artigo_table', 1),
	(8, '2017_03_12_102249_create_vendas_table', 1),
	(9, '2017_03_12_102615_create_venda_artigo_table', 1),
	(10, '2018_01_06_135404_create_posts_table', 1),
	(11, '2018_01_06_140455_create_roles_table', 1),
	(12, '2018_01_06_142228_create_role_users_table', 1);

-- Dumping structure for table kyendaweb.pessoa
CREATE TABLE IF NOT EXISTS `pessoa` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL,
  `nome_operador` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `stato` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `nome` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `descricao` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `telefone` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `pessoa_user_id_foreign` (`user_id`),
  CONSTRAINT `pessoa_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table kyendaweb.pessoa: ~23 rows (approximately)
INSERT INTO `pessoa` (`id`, `user_id`, `nome_operador`, `stato`, `nome`, `descricao`, `telefone`, `email`, `created_at`, `updated_at`) VALUES
	(2, 1, 'Marcial Mbango', 'Fornecedor', 'Coster', 'SD', '23456', 'coster@gmail.com', '2018-08-02 21:17:35', '2018-08-02 21:17:35'),
	(3, 1, 'Marcial Mbango', 'Fornecedor', 'Coster', 'SD', '23456', 'coster@gmail.com', '2018-08-02 21:22:46', '2018-08-02 21:22:46'),
	(4, 1, 'Marcial Mbango', 'Fornecedor', 'Coster', 'SD', '23456', 'coster@gmail.com', '2018-08-02 21:24:26', '2018-08-02 21:24:26'),
	(6, 1, 'Marcial Mbango', 'Cliente', 'Moster', 'SD', '123456789', 'email@gmail.com', '2018-08-02 21:34:08', '2018-08-02 21:34:08'),
	(7, 1, 'Marcial Mbango', 'Cliente', 'Moster', 'SD', '123456789', 'email@gmail.com', '2018-08-02 21:38:10', '2018-08-02 21:38:10'),
	(8, 1, 'Marcial Mbango', 'Cliente', 'Moster', 'SD', '123456789', 'email@gmail.com', '2018-08-02 21:39:45', '2018-08-02 21:39:45'),
	(9, 1, 'Marcial Mbango', 'Cliente', 'Moster', 'SD', '123456789', 'email@gmail.com', '2018-08-02 21:42:05', '2018-08-02 21:42:05'),
	(10, 1, 'Marcial Mbango', 'Fornecedor', 'SD', 'SD', '2134', 'sd@gmail.com', '2018-08-02 22:02:24', '2018-08-02 22:02:24'),
	(11, 1, 'Marcial Mbango', 'Cliente', 'Cat', 'SD', '123456789', 'email@gmail.com', '2018-08-02 22:06:49', '2018-08-02 22:06:49'),
	(12, 1, 'Marcial Mbango', 'Fornecedor', 'DE', 'SD', '123456', 'de@gmail.com', '2018-08-02 22:50:29', '2018-08-02 22:50:29'),
	(13, 1, 'Marcial Mbango', 'Cliente', 'Clinto', 'SD', '123456789', 'email@gmail.com', '2018-08-02 22:51:22', '2018-08-02 22:51:22'),
	(14, 1, 'Marcial Mbango', 'Fornecedor', 'ggdgfs', 'SD', '4433', 'dfff@fgfgfg', '2019-01-12 16:31:49', '2019-01-12 16:31:49'),
	(15, 1, 'Marcial Mbango', 'Cliente', 'gfgfgfgf', 'SD', '123456789', 'email@gmail.com', '2019-01-12 16:34:01', '2019-01-12 16:34:01'),
	(16, 1, 'Marcial Mbango', 'Cliente', 'sddddd', 'SD', '123456789', 'email@gmail.com', '2019-01-12 16:38:13', '2019-01-12 16:38:13'),
	(17, 1, 'Marcial Mbango', 'Cliente', 'wedsdsddd', 'SD', '123456789', 'email@gmail.com', '2019-01-12 16:40:57', '2019-01-12 16:40:57'),
	(18, 1, 'Marcial Mbango', 'Fornecedor', 'Qnb', 'SD', '1234566789', 'qnb@gmail.com', '2019-05-04 12:17:14', '2019-05-04 12:17:14'),
	(19, 1, 'Marcial Mbango', 'Cliente', 'Qnb', 'SD', '123456789', 'email@gmail.com', '2019-05-04 12:18:01', '2019-05-04 12:18:01'),
	(20, 1, 'Marcial Mbango', 'Cliente', 'mm', 'SD', '123456789', 'email@gmail.com', '2019-10-21 20:17:35', '2019-10-21 20:17:35'),
	(21, 1, 'Marcial Mbango', 'Cliente', 'Bino', 'SD', '123456789', 'email@gmail.com', '2019-10-27 09:33:48', '2019-10-27 09:33:48'),
	(22, 1, 'Marcial Mbango', 'Cliente', 'Marcial', 'SD', '123456789', 'email@gmail.com', '2020-01-21 16:05:14', '2020-01-21 16:05:14'),
	(23, 1, 'Marcial Mbango', 'Fornecedor', 'Novo', 'SD', '45687', 'novo@gmail.com', '2020-01-21 17:36:15', '2020-01-21 17:36:15'),
	(24, 1, 'Marcial Mbango', 'Cliente', 'Ana', 'SD', '123456789', 'email@gmail.com', '2020-01-21 17:39:10', '2020-01-21 17:39:10'),
	(25, 1, 'Marcial Mbango', 'Cliente', 'uiyu', 'SD', '123456789', 'email@gmail.com', '2020-02-09 22:20:24', '2020-02-09 22:20:24'),
	(26, 1, 'Marcial Mbango', 'Cliente', 'Nevante', 'SD', '123456789', 'email@gmail.com', '2023-07-21 17:37:31', '2023-07-21 17:37:31');

-- Dumping structure for table kyendaweb.posts
CREATE TABLE IF NOT EXISTS `posts` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL,
  `titulo` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `slug` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `texto` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `published` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `posts_slug_unique` (`slug`),
  KEY `posts_user_id_foreign` (`user_id`),
  CONSTRAINT `posts_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table kyendaweb.posts: ~0 rows (approximately)

-- Dumping structure for table kyendaweb.roles
CREATE TABLE IF NOT EXISTS `roles` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `slug` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `permission` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `roles_slug_unique` (`slug`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table kyendaweb.roles: ~2 rows (approximately)
INSERT INTO `roles` (`id`, `name`, `slug`, `permission`, `created_at`, `updated_at`) VALUES
	(1, 'Author', 'author', '{"create-post":true}', '2018-08-02 11:30:05', '2018-08-02 11:30:05'),
	(2, 'Editor', 'editor', '{"updat-post":true,"publish-post":true}', '2018-08-02 11:30:05', '2018-08-02 11:30:05');

-- Dumping structure for table kyendaweb.role_users
CREATE TABLE IF NOT EXISTS `role_users` (
  `user_id` int(10) unsigned NOT NULL,
  `role_id` int(10) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  UNIQUE KEY `role_users_user_id_role_id_unique` (`user_id`,`role_id`),
  KEY `role_users_role_id_foreign` (`role_id`),
  CONSTRAINT `role_users_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE,
  CONSTRAINT `role_users_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table kyendaweb.role_users: ~5 rows (approximately)
INSERT INTO `role_users` (`user_id`, `role_id`, `created_at`, `updated_at`) VALUES
	(1, 1, '2018-08-02 11:31:30', '2018-08-02 11:31:34'),
	(2, 2, '2018-08-02 22:20:11', '2018-08-02 22:20:11'),
	(3, 1, '2018-08-02 22:53:11', '2018-08-02 22:53:11'),
	(4, 1, '2018-08-16 10:51:57', '2018-08-16 10:51:57'),
	(5, 2, NULL, NULL);

-- Dumping structure for table kyendaweb.vendas
CREATE TABLE IF NOT EXISTS `vendas` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `pessoa_id` int(10) unsigned NOT NULL,
  `nome_pessoa` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `recibo` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `serie` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `numero` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `imposto` double(8,2) NOT NULL,
  `valorPago` double(8,2) NOT NULL,
  `troco` double(8,2) NOT NULL,
  `formaPagamento` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `total_vendas` double(8,2) NOT NULL,
  `estado` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `semana` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `vendas_pessoa_id_foreign` (`pessoa_id`),
  CONSTRAINT `vendas_pessoa_id_foreign` FOREIGN KEY (`pessoa_id`) REFERENCES `pessoa` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table kyendaweb.vendas: ~12 rows (approximately)
INSERT INTO `vendas` (`id`, `pessoa_id`, `nome_pessoa`, `recibo`, `serie`, `numero`, `imposto`, `valorPago`, `troco`, `formaPagamento`, `total_vendas`, `estado`, `semana`, `created_at`, `updated_at`) VALUES
	(1, 9, 'Moster', '9630-02-08-2018', '08-2018', '2134', 18.00, 4.00, 0.00, 'Dinheiro', 4.00, 'A', '2018-Aug-Thu', '2018-08-02 21:42:05', '2018-08-02 21:42:05'),
	(2, 11, 'Cat', '3839-02-08-2018', '08-2018', '213456', 18.00, 4000.00, 392.00, 'Dinheiro', 3608.00, 'Canselada', '2018-Aug-Thu', '2018-08-02 22:06:49', '2018-08-02 22:52:19'),
	(3, 13, 'Clinto', '7244-02-08-2018', '08-2018', '234567', 18.00, 5000.00, 2000.00, 'Dinheiro', 3000.00, 'A', '2018-Aug-Thu', '2018-08-02 22:51:22', '2018-08-02 22:51:22'),
	(4, 15, 'gfgfgfgf', '9413-12-01-2019', '01-2019', '544', 18.00, 322.00, 0.00, 'Dinheiro', 8966.00, 'A', '2019-Jan-Sat', '2019-01-12 16:34:01', '2019-01-12 16:34:01'),
	(5, 16, 'sddddd', '6171-12-01-2019', '01-2019', '424242', 18.00, 3000.00, 0.00, 'Dinheiro', 3000.00, 'A', '2019-Jan-Sat', '2019-01-12 16:38:13', '2019-01-12 16:38:13'),
	(6, 17, 'wedsdsddd', '4654-12-01-2019', '01-2019', '442344343', 18.00, 4000.00, 0.00, 'Dinheiro', 7200.00, 'A', '2019-Jan-Sat', '2019-01-12 16:40:57', '2019-01-12 16:40:57'),
	(7, 19, 'Qnb', '1284-04-05-2019', '05-2019', '123456789', 18.00, 250.00, 0.00, 'Dinheiro', 250.00, 'A', '2019-May-Sat', '2019-05-04 12:18:01', '2019-05-04 12:18:01'),
	(8, 20, 'mm', '4579-21-10-2019', '10-2019', '233564765', 18.00, 5000.00, 4750.00, 'Dinheiro', 250.00, 'A', '2019-Oct-Mon', '2019-10-21 20:17:35', '2019-10-21 20:17:35'),
	(9, 21, 'Bino', '2800-27-10-2019', '10-2019', '25789', 18.00, 1500.00, 0.00, 'Multicaixa', 3000.00, 'A', '2019-Oct-Sun', '2019-10-27 09:33:48', '2019-10-27 09:33:48'),
	(10, 22, 'Marcial', '4624-21-01-2020', '01-2020', '12432', 18.00, 300.00, 50.00, 'Dinheiro', 250.00, 'A', '2020-Jan-Tue', '2020-01-21 16:05:14', '2020-01-21 16:05:14'),
	(11, 24, 'Ana', '9809-21-01-2020', '01-2020', '364576', 18.00, 200.00, 50.00, 'Dinheiro', 150.00, 'A', '2020-Jan-Tue', '2020-01-21 17:39:10', '2020-01-21 17:39:10'),
	(12, 25, 'uiyu', '1725-09-02-2020', '02-2020', '5879', 18.00, 789.00, 0.00, 'Dinheiro', 3000.00, 'A', '2020-Feb-Sun', '2020-02-09 22:20:25', '2020-02-09 22:20:25'),
	(13, 26, 'Nevante', '8878-21-07-2023', '07-2023', '927800505', 18.00, 500.00, 50.00, 'Dinheiro', 450.00, 'A', '2023-Jul-Fri', '2023-07-21 17:37:31', '2023-07-21 17:37:31');

-- Dumping structure for table kyendaweb.venda_artigo
CREATE TABLE IF NOT EXISTS `venda_artigo` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `artigo_id` int(10) unsigned NOT NULL,
  `venda_id` int(10) unsigned NOT NULL,
  `qntidad` int(11) NOT NULL,
  `p_venda` double(8,2) NOT NULL,
  `desconto` double(8,2) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `venda_artigo_artigo_id_foreign` (`artigo_id`),
  KEY `venda_artigo_venda_id_foreign` (`venda_id`),
  CONSTRAINT `venda_artigo_artigo_id_foreign` FOREIGN KEY (`artigo_id`) REFERENCES `artigos` (`id`),
  CONSTRAINT `venda_artigo_venda_id_foreign` FOREIGN KEY (`venda_id`) REFERENCES `vendas` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table kyendaweb.venda_artigo: ~13 rows (approximately)
INSERT INTO `venda_artigo` (`id`, `artigo_id`, `venda_id`, `qntidad`, `p_venda`, `desconto`, `created_at`, `updated_at`) VALUES
	(1, 2, 1, 1, 4.00, 0.00, '2018-08-02 21:42:05', '2018-08-02 21:42:05'),
	(2, 1, 2, 1, 3600.00, 0.00, '2018-08-02 22:06:49', '2018-08-02 22:06:49'),
	(3, 2, 2, 2, 4.00, 0.00, '2018-08-02 22:06:50', '2018-08-02 22:06:50'),
	(4, 3, 3, 1, 3000.00, 0.00, '2018-08-02 22:51:22', '2018-08-02 22:51:22'),
	(5, 3, 4, 3, 3000.00, 34.00, '2019-01-12 16:34:01', '2019-01-12 16:34:01'),
	(6, 3, 5, 1, 3000.00, 0.00, '2019-01-12 16:38:14', '2019-01-12 16:38:14'),
	(7, 1, 6, 2, 3600.00, 0.00, '2019-01-12 16:40:57', '2019-01-12 16:40:57'),
	(8, 4, 7, 1, 250.00, 0.00, '2019-05-04 12:18:01', '2019-05-04 12:18:01'),
	(9, 4, 8, 1, 250.00, 0.00, '2019-10-21 20:17:36', '2019-10-21 20:17:36'),
	(10, 3, 9, 1, 3000.00, 0.00, '2019-10-27 09:33:49', '2019-10-27 09:33:49'),
	(11, 4, 10, 1, 250.00, 0.00, '2020-01-21 16:05:14', '2020-01-21 16:05:14'),
	(12, 7, 11, 1, 150.00, 0.00, '2020-01-21 17:39:10', '2020-01-21 17:39:10'),
	(13, 3, 12, 1, 3000.00, 0.00, '2020-02-09 22:20:25', '2020-02-09 22:20:25'),
	(14, 7, 13, 3, 150.00, 0.00, '2023-07-21 17:37:31', '2023-07-21 17:37:31');

