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

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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$tw78FwhizbSdI1OdSq4HyyIPzWYT98xSqsDxx4R0GNTgCk6ouvnbL','user','ak_d9c6c9eefcdfb141','2023-09-05 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$HcAxFbNT/suRh9QwuFV7KcUdzOvOfsyzFq8DtTsCanCyfjZMMzybC','user','ak_cc858531f5590bac','2023-06-07 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$nZ8lcr7sRo.uATNJSD1.fXqzYejS.gXxpL1O7FfgrS4KsGFh0Ulni','user','ak_10613036855189f7','2023-02-05 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$4g1VAdng/bb3vMB2A8.6UDd1ZhUSvUGG0H3POJzbqXugOelW0wDi0','user','ak_6dddfe22f76ab14f','2023-02-13 10:22: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=28705;

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


