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

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


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

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


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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$QcSou0qtA8AQifDNGFjQIUfyIdTwOBDR1Jo0rH1gzp4Vk7qetBC4D','user','ak_8004548ca32d9d46','2023-04-28 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$9oPfU2SnhQVuNd2IyUzpykagiCu/0viJuP7DvH4F7RfCgrjFh/TRn','user','ak_c02c2442ffb4fc45','2023-09-09 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$HURXUrWK.m/M0L.TFDGN7xUi2esIKHBTSWvYaIrDIWRTL0hTDAbli','user','ak_4273e0435d579ec6','2023-05-21 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$zkm1iDvHdkRUxyzP8V7KOXgSKPEaKgc7qK.y12WYlGALkEMp3RvXv','user','ak_346dee4bc8fc14ad','2023-08-09 10:08:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@internal.io','$2b$12$S7iZ9Y5xXZsxpjmhoSpWJzMQmm43LXAOskd8guLLI6wAZ/0NGH1Qg','user','ak_96f55ae5baf1e7d8','2023-12-16 10:11:00',NULL);
INSERT INTO `users` VALUES (6,'admin@company.com','$2b$12$47jjY7SzlL.73XR5w837BJrg4mylES4xjUTw85M6IGnOn4QsEYEFx','user','ak_4bbb223d04fe44c9','2023-03-02 10:22:00',NULL);

