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


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

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


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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$7wpPPm8BllG6B.X8IUd3ij2i.Fg8dYO.olV7Icp753ZonrhXJvrs5','user','ak_92e97cc05e1361a8','2023-03-28 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$r7zsG3pDFWiBg0ed1B2pwVzqEEV8TXfLnd9bYR4/B8tbmuUsGaFEH','admin','ak_d5ee5d7dba7aac93','2023-05-22 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$E/CZ6gqEAJiZVWMkCUVPsLgOeuxPUlbdAoDmpB3jqO7dQkQEyMY2B','admin','ak_5035622dc8b1609c','2023-08-17 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$.D1ilb1SvEKE.Y5OP4ZHuiX9ItBjHcyBGLiTFh1s3kdjwZFDyxA/B','user','ak_eef3caeeeba8a424','2023-01-03 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@company.com','$2b$12$t5TkQm5J7CtXziPfRMepi8a3iIFlWHLCdLmMBe.pUfbxf.95UaA.v','user','ak_29b368e93f39dd20','2023-09-18 10:09:00',NULL);

