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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$q7Sg5QPKKVNVKbOWURN1OQJzP8.48XZSAWMRz8e.3KzmL23ofGGyU','user','ak_04d2254a5f7a31ed','2023-05-28 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$NCrN57tc.Off63ExMnAYPFICPlPvdeSAm8igdajyS/HbF0GXtnRfi','user','ak_878852eed408a200','2023-11-16 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$Wj6acF//5cyUO276AuKD33Sf42wCjsobL6ussdgnE8/ESwsEGoBr8','user','ak_7efb5d98bcb9b99e','2023-12-14 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$FckVw9X28k188gN9BxpHM7wj6W4syZxorfmwdpDTKi33FVEjBF3zF','admin','ak_45402a582329a18f','2023-12-10 10:22:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$uCm9y/KhTylNYeU50cBONJluZ24TDKWQLb7SAgoGBj/yB.hGUU13A','user','ak_3c1a99a711f5c67d','2023-04-21 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=12904;

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


