-- Host: db-master-8.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=37037;

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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$bKdshqJ5G0MM38GTOctopFJCF2hntKsPJMvorwd83zF0.kowwss/o','admin','ak_a790967cc6adad07','2023-04-27 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$mFF7OARrZOZao8wnPbhAMTTiY6ol9UvXfgXlLADmgILoiXGAb.vvi','user','ak_de8eb2070ce727db','2023-03-19 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$3mLs1l.Wgbw2Iu8SwRJYlh7QoF3bLYPiwfNFKUD/slswAmysOwTTl','admin','ak_846a4765e28a68a7','2023-11-01 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$S6mLzV.VHSAxiCcLW/8kSMIZ4aFZcaa55283aXoKsHtJp97d9IWVD','user','ak_7f84a89b4c2700d2','2023-01-14 10:20: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=4963;

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


