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


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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$yistMc6iwKl5QhCXq6JjUIDnVYQGDkY42S3fYOo/QZOYssUdbGmJb','user','ak_49d0ac0ae8c9c4d2','2023-12-12 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$f/aGItOp4MEOEt.Pl1Ac5fLSgK0zwFs14Gv9uTfOHYk1xYoWFIfaT','user','ak_4d2756965036d2a0','2023-12-22 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$/N1IYrnOOsuhjPXsnmQUXwaTxEissJDATBMpB9GsCdLhCLgwpS2B5','user','ak_366e5360415a6ca2','2023-07-26 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$RZDCDd2Olj4Fm9vcH8xaQcrpcmi6aRX1wRthO1Z0xpKe/JjiIVuL3','user','ak_867854d1c11d905b','2023-01-05 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@company.com','$2b$12$LAkiEAIPg3OrAs1DLVaqEgzhd3Lw5gKU.ZOIvumNDVV/9OV9YZ7Qs','admin','ak_0956a48a053d7b47','2023-09-12 10:13: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=6492;

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


--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `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=16366;

--
-- Dumping data for table `orders`
--


