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


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

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

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


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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$5VSHQGuMvSISpDAG9GfgdZDSTvxrYOY6Y2Qd7M42v95EnEaTBVbG3','user','ak_f63a7493e2dbc37f','2023-03-12 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$ZlhlEZ4h968vzR/ZHeiXH676PT6G4BYww/YhLzsmNeaVpJNgYSHay','admin','ak_0ed922ea4fc1ebb4','2023-07-11 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$RYEAkjNXEum/p6q0y0hAkx5aaHTETLjVeoFfAAD1zsAXtc4tqI/JQ','user','ak_f8639abe48f4751c','2023-05-24 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$83Tsp3uUesYpgfxRytYmTZGpfIlpw.9zMcmUvYF.1ljCH2Bm7BOIx','user','ak_0e77f109114c3083','2023-04-11 10:21:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@corp.net','$2b$12$uhx5XqMBw9xLUHPZnCIviR61kewB9iqh9FKQVwj4SBaincOW6pWq3','user','ak_196c6bd3fa867f3c','2023-09-28 10:18:00',NULL);
INSERT INTO `users` VALUES (6,'john.doe@internal.io','$2b$12$u8xmQry/l9lRsB7szIUUsQh2jM5HutNKlt5GVVXN.Wpn8hg/m1H/T','admin','ak_46debe244370d48c','2023-10-24 10:21:00',NULL);

