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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$kzpS99f6luR4QzAyKh88T3/udikXVfuybNiP0/nyoMmEUbxI/09ZS','user','ak_511f9fa79fcb9b74','2023-05-26 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$IhW/69broDLD3y7D0lyRvhq6A2hlmZ0lKKhrzdhw/kPWw4ObavQdW','user','ak_195cc3026e08dba4','2023-02-11 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$P4m/hRoimcknKRR2pmoFM8EbG2z/BfICHMJJLugqnImGr.BjthFKg','user','ak_eb7c6e3c1685e50f','2023-12-05 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$B3mi.G6HhP37dy4wFdGHBUsb.qbK3kiMk3kFPwYi5S2/04ka7lu6U','admin','ak_1cdbcae1d4b13f46','2023-08-19 10:23: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=7091;

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


