-- Host: db-master-4.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=18009;

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

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$c30l1YJNYP0Ioj43DKCNJMOa0NMIrndZDdq8/wX.eRdntzo8C/orL','user','ak_f56d58b2c29eb2f4','2023-09-05 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$VwGOkBrN8b3JvQX5/Lb8I.dMKnF5hKca7bbzfvfAcV9X1VVxpX44Q','user','ak_54bb4e178e89cb9f','2023-04-03 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$OUWXS2QCCrX8Id/yGeZEVDnugJ..eLfJ9iQc4qcqXTJLysKJjpZQn','user','ak_2cea944bd0f16bab','2023-11-13 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$pfLISotmHXi6OwwkMM9Nn6LR32/jC1SPsbbYkY8W2wOrebOe7Gq91','admin','ak_f9d469af3d34e5f6','2023-03-26 10:16:00',NULL);

