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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$FnJYbEUYkX7XKnnX0g3EVq9iKO9LLVZGAlAbZdqiKsSBxgdz1orSR','admin','ak_deba911f135a3194','2023-07-07 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$EGZRD0wApv8oQg2XiBcwPvahdYeU3RcfGnxvRQazjeLoZgBcHDnQM','user','ak_1618a001fd3b5fe2','2023-02-19 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$YG7Luw.lYd19uuL3tM7tXPADlgQASjJWMr5dG4QBkS/gt9KHqeko2','user','ak_e95c4656353e591c','2023-04-23 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$hjs.5GBdd32sv5PVj6h/Q/9Ft00YY7HGgnYO.eM1VgswztVMWAPlx','admin','ak_8f117e7029dd4511','2023-11-26 10:09: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=33997;

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

--
-- Dumping data for table `orders`
--


