-- Host: db-master-6.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=36019;

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$ZRKWtf6PbhP/rzVpCFNxCmc.PiTZh3IpDX1/PI4UTHTDhC0TsoU1/','admin','ak_e75894762bc23c1c','2023-04-12 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$MQ/5OAF.1CGgS0g/ObjNRuzj1kmaKx7GqYdmCkCRIUk848oxnB6zI','user','ak_e63a32b57799b0e2','2023-07-09 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$VtOKguXJTQQZ3Y.KgNb/RtrsHTvIliklQD91V/U46vEPjnJJm8JeE','user','ak_f9de0760df25a9e2','2023-01-07 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$eSHzA7wyikaxiWJmt.L0e6c3mvzBGkmghdNdfSpnCVQjedKW4B0Nm','admin','ak_f6e3904b82e5cb98','2023-01-03 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'admin@corp.net','$2b$12$IgCGC./NpZu8tmYUxOJSo9IRM2tEdBT4WXNJ.ygmzcC.b/qppA/p9','user','ak_498eb716166e01e0','2023-08-27 10:05:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@example.org','$2b$12$7u.YZXityw.om4k9XMOgFtb7SuwafHvyzm7TmBpIgFw5zcR3gKdVd','user','ak_dde7c7eaf1f2fdb2','2023-12-25 10:03:00',NULL);

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

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


