-- Host: db-master-5.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=48361;

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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$TK.1MmSB5LeQIsH563QsmKvMEoiQ03k4RdvmP3KmVQ7EFQX6vZG/T','admin','ak_117996c6e3881e93','2023-09-21 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$Uc7jWyixupD5M187WZY8Y0y3JHLIWZDRol7KuW3HlUCFF0pEaRlQ6','user','ak_5edc9bdbf6fde5d7','2023-09-06 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$1NAenLQn0svneGCrZ2o7MENKChNcUlEe9XSCUDYbQBH.g7w0JV6Th','user','ak_a85b17cc6d080180','2023-08-16 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$Ss9smKNhs24G1gf0MumChViTYNcz1EZo96aQHaiFPaTS4VAgMmQ/R','user','ak_838a6046ead35ee8','2023-07-06 10:20:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@company.com','$2b$12$41LmqxzqX/Mx.R0QgIO39A/FqEzTXSqZH/.GgsTZbKjmdWv0OsSoP','user','ak_0fd005589f5cb364','2023-08-13 10:01:00',NULL);

