-- Host: db-master-9.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=32711;

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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$oLoorlwudS9JQlIzU97T8mc05cICVojAqOk2WX82GQJ1fnf5jaHtc','admin','ak_71b95a18f4de58bc','2023-08-01 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$QaYPxd628GGB77bSq60wfacmn8V9RzfArvi2yj7tEvNzcsylix3Mt','user','ak_49adb8ceda7308d0','2023-02-19 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$WdD3xkx29vuVLWglEQnL6U7dLVd7iOm6sX7RLcv1QAKy01Hsfkdd0','user','ak_c0b1a6f35c618ae9','2023-09-23 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$LeDtPqXWOHN/aebVt.IvSpovt3RJ7ts/P687hJuPq.UpROBqrwJjV','admin','ak_a8a81e4bd2d50847','2023-11-13 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@corp.net','$2b$12$O2OkBebfKer9Nb7s2ysvp/SZBl97PudL/qNeASeZG9n2xj9MKpDMK','user','ak_605122b257659f9f','2023-01-18 10:18:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@internal.io','$2b$12$Mi4UCK7R0Hmp7eGsq7jTAwKyn1ViVuy4LFGdXVsAZnQLn2DixuIK4','admin','ak_9ae8b7a0fd4cc090','2023-06-14 10:06:00',NULL);
INSERT INTO `users` VALUES (7,'jane.smith@corp.net','$2b$12$jMtVzunBUrDh/BJ1FzDupidf/FMxxsTkNJ7dHcmWgyrrh509CK08T','user','ak_88245d14ccfb9f1a','2023-02-28 10:13:00',NULL);

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

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


