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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$MDL7349BAXVs7oOOP.YEM4SHb9QK/KwsAFcyrofLXx1KEVwCgPTY1','user','ak_4eed016e63f5b061','2023-02-04 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$zwhBKN8xU.pm6HZuUceMkiAZ/hQH5Wmmuswlt2qYX6tJqP1kpGH7P','user','ak_903ca10008736823','2023-02-24 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$BMi1mLrr1zCvPL1QH7OgAIesGY4xdL1/83FSVxf.TpIhGcR2VSk.P','user','ak_0970776a606122bb','2023-02-03 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$musVjFbwht3Dcsi5YWxVbGK9CrmF4x/GCWKUlL5YuazpiGK/hNlAu','user','ak_58f1e7faeff29a30','2023-07-28 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$b8Yj.OnZuOuEzJCgrhM2CD4V0w0BJr7kRMWpB7gGRDMs0vO6m9Ymb','user','ak_60db72498822f096','2023-12-22 10:03:00',NULL);

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=30169;

--
-- Dumping data for table `sessions`
--


