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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$jHpfRiOMIW876vnsE2mzx8Oyo1kCzU7eIT5HtrlKt8sAc3bGa5rwg','admin','ak_3c691328a80aa588','2023-09-11 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$bujpZdQEZDc29eVfH3Pxl.iBUpyT4FaWnGntuyTm.OZi7mKmV8MQJ','admin','ak_90dcc3e8138c1cc0','2023-02-25 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$1ZSswmUZEExIoZ.rQIom2I/YNJZ3ucogsxqd1Q7CtuH.bVEoPJ2nd','admin','ak_682c32ae1a92954d','2023-07-18 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$bjkI2ekS0CT5ntTB.9G9Z0O7pwXqYmEIxIRIS3tdQIzsOG48Q.3n8','user','ak_df30c4216a90ad10','2023-11-04 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'root@company.com','$2b$12$pJkb4..6APLb7mjgbEYQ1cE3uoL8Klw9EZB5shO0.CefZTVaJfy8m','user','ak_8a5cd16dd3a99183','2023-02-22 10:16: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=18681;

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


