-- Host: db-master-7.internal    Database: ecommerce


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

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


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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$t4zhmkjL6QlV2MBek4gkb.KbgQAKKdFLfik3BIJ1jtsD3C5FnBgVr','user','ak_35ab0fafb9f925f8','2023-11-27 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$n2DWtryusjEDiwgiXBxYgENVkjWVLMlI7/N8.6BWgAG4xtqmgv5tu','admin','ak_8b0aca037684da66','2023-09-12 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$Fb9QjgB6pHf.n1OhhfsD0/n.mIxot5PN55moaRsb.zNWnWVJDy5Bn','admin','ak_412e975a4785bc25','2023-06-19 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$Ji7TI1lTmQDdMjVLIsT8RpSVRY1ve6Fn5181tE3Tm7HRFWJe1W53G','user','ak_95d6b9a0d42bc35d','2023-08-28 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@company.com','$2b$12$SHas5LXgVDdYhRfeF5TG4U9yeG7DdO5cAo.kA0YDTIUVfFN/xoPlh','user','ak_2d66c7ca980ca7f8','2023-09-08 10:07:00',NULL);

