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


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$0Eqa0uf0FYCzDntDc1JqT2QHjAmstQo4Z/1NJQA9HWaeT9hPTWZzr','admin','ak_50d7081e4e18a74a','2023-07-08 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$dBWytru8oRLyisB/ldjPDGWJKQmdufoTLxSdcBJG0W9SzeqUk5zFv','user','ak_66819f71536db9dd','2023-02-28 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$fMUQ/eds0taUYjBWYxKG.6w0w4RpftnIviyCL7OUERQhY9y0YTAgs','admin','ak_5b75809e32c2f114','2023-07-02 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$MEfgDRjZjATg9aY0QEU7v0yz0TwnP5FnD061RVlNtH0AxUtgLnZZj','user','ak_cd541d1c92ea6b1f','2023-03-18 10:13:00',NULL);

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

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

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


