-- Host: db-master-7.internal    Database: ecommerce


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=50804;

--
-- Dumping data for table `products`
--


--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=8417;

--
-- Dumping data for table `audit_log`
--


--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `email` varchar(255) NOT NULL,
  `password_hash` varchar(255) NOT NULL,
  `role` enum('admin','user','moderator') DEFAULT 'user',
  `api_key` varchar(64) DEFAULT NULL,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=9535;

--
-- Dumping data for table `users`
--

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$nFa2znTzsumkwD.8KuL1TtqgCwx5IkoM7dSJzFoQJpbkTyNibciRs','admin','ak_dc89e3126efc8278','2023-08-09 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$LfCJvNsaIAEgNOBFMaTLi02bpyI/pXX07QkQI6aYTiznhCknwdC72','user','ak_7b174de46b406cd0','2023-01-07 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$VMZb9PnbgAlX222EZUJ81geO8rJ2gS/jYcQR73EdFe21F3cOsE/If','user','ak_b65cc496bc1220f1','2023-06-03 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$BugCs1qO.rJAiZrq1GLnW17jas19jG.GSzshpT4BTpKhVWM/npTZY','user','ak_5c563022c8169c40','2023-02-01 10:18:00',NULL);

