-- Host: db-master-5.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=22301;

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


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `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=24791;

--
-- Dumping data for table `products`
--


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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$IiALBYjUGAO2XC6vA1C4dAlsBhplurX29wKrrpR8YmiNgZI0pKCu6','admin','ak_a760783e25461ab1','2023-08-16 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$/5W6fh3O9713.OREbb53Y61JSniODDkWIir5MRh3Ec1z2jwY5ZZV2','user','ak_5b7e76b4fff43049','2023-11-13 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$Um.3TflJxjzmJ4zQfwjm5sO2i2pnaqKvnT4XZaPri0t79x5iHhQhq','admin','ak_0326856a448adf08','2023-09-19 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$mUSvBqQVs7oAeDpZhQXtv1NTyfoT7.6EIf0qtHGo7mcX05.mjSzet','admin','ak_de73dd023404acc6','2023-08-18 10:22:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@corp.net','$2b$12$uZdSEp98pWwv7pa5M5yYEd.9ECE9702lEhJMlJNLt36esOF0kIaAO','user','ak_8b9c44249c288515','2023-11-27 10:06:00',NULL);

