-- Host: db-master-0.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=31697;

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


--
-- 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=36245;

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$HqiiOoSi5lzXo45.ekwUXyLm/yYA.QEUMPD/bfg37rJi0xLgsflw1','user','ak_af0aae452e6bcaae','2023-06-20 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$C8pvSPiELSGr4O8NKJ8F2/WM/Q5xZK8k8x../DTmD/HiIGmlMO5v2','user','ak_c499ed91aaff8721','2023-09-11 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$qb9T8ctl08H4s5nLHHbnmCWXD2xUdInbvTptDdcGl00AncTdBnwKl','user','ak_4f69d51fafd9993d','2023-08-25 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$pqXRJaMxN28Pajg3GpMAptOD5MpGrhG5zs.YcjJvJHdQcMMgElg5f','user','ak_457e343c1cb79b81','2023-04-07 10:15:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@example.org','$2b$12$nKrc2Cth1krWKTEf2BqWObSR3pqqWt8RILdttz5nC/pFI/3VaD1b6','admin','ak_cf04afa0a6223e88','2023-11-06 10:22:00',NULL);

--
-- 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=32061;

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


