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

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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$aT1CLAnROnwmI4u2IgDCSwUYjpNeRrdvUkEdJfGMfFXXBz34JUK27','user','ak_df26c341a99970c7','2023-02-13 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$I6owGWNcI9XRjWtHgMslrrpQWPmzP5ptm7VbtP0bGC9TVAqBVZfhM','user','ak_d7090a7854efa36f','2023-10-27 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$vbXvyCnvDYAqUOhaOAUHT/eppJLmTkG6d.ZWY4ye51xOEVq2BKeUR','user','ak_2ac2dd67a79e03c7','2023-06-21 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$UUksMcKxLDodFiy7jfPvAw0UUoU7Knp6d2hnsCSHJgmnhbqLw8aX7','admin','ak_2325f5c6b4f46296','2023-05-22 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@internal.io','$2b$12$ovaEwpoljnJA/IBkaylEQhJBFn9hgNFv9Ob6pZH8TCMH.wEIOjRnE','admin','ak_1a010cac199ba37e','2023-07-02 10:22:00',NULL);

