-- Host: db-master-1.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=11956;

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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$7GDipTfxLslLlr2GOAjVxG4Aoz/oruueGxPnuIpBAK/q34u0zXs2z','user','ak_d96e9341ebf03be2','2023-01-23 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$gNdunHm/c4XSgy6BtBRTgsgNPGhB4NNF/ucrK8QpFEwDq.rXeWHNu','admin','ak_3782a31964a31fdf','2023-09-13 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$oMxoFHBHAmif38JdaxFBr9PBNRtKS2GUgolAo/IevOZRPlDkYtOmC','user','ak_b997642cbb5094d6','2023-07-04 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$Ur5vJQKjt0RTfTyr2RUa9XRNC2QTyezZS7uBCTZ2.oHRZTpxeXUz.','user','ak_063a3023e88ce93a','2023-05-03 10:21:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@example.org','$2b$12$0X8KZLuA3wV7LojVaTSpXpWW28yMQfxv1RVVAmLzSMnQF7WpIRXMb','user','ak_bdbc98cd3536c5e8','2023-04-02 10:00: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=36149;

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


