-- Host: db-master-4.internal    Database: ecommerce


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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$rMJLae1yQGu5lCvRf1G9Nr4pdmaW.mJ92wReHtnk7S1HRA.dphk7Z','user','ak_e2953155ff89ae4c','2023-04-27 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$b7GDEUJnIme7A54rD33bhEm9lJMovmQocS3VP84ozTPtiIroMpcOY','user','ak_f75a2bb22e4116f1','2023-03-19 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$vEeClYqIiw/3Gtj070xiYG/LxjFtgybFqGUr7ExC/zFaL8PXmIiQC','admin','ak_13a42d394481919b','2023-08-22 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$43XoSrJxIhU.XtEzm5EFeqwCJshphQvSxtrorVWKhaCWEEy6rG3Kj','admin','ak_66a878c6f1ad0e37','2023-02-02 10:13:00',NULL);

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

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

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


