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

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

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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$D7X/0mDCJzBpFrF6qC2lRrh6fnmcOCnwBFmyzJHH4lKW51IhjTqD7','user','ak_e6b88b3494d1196b','2023-04-12 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$2zPVaqJb4SGhqW08SSuOXu37AWioiur9hXnKm2iIAUES1j5PlTJVT','user','ak_7f2e7c0c564d63e9','2023-07-20 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$Sl/tnEXEVIS/PHVSWjs/Q430U6F30uug0vksinoRO3muHqQopGtnP','user','ak_c397e6b29c801d18','2023-03-19 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$zLpjI/X/4IjHS1jw9xSz4zVaMIdmL5GJcltJvBPw0h1CUQQ1FKCN.','user','ak_df198f0dbdd4ef4d','2023-12-25 10:08:00',NULL);

