-- Host: db-master-6.internal    Database: main_app


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

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$KVq1sEyVXpdP92kjcrSNJ.gW4l2tZTiiuZHm76faAsKhCp0E6MLOB','user','ak_6d59eda422ad4d4f','2023-01-17 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$K1ArbR2V5DlQkCac7Nr6KYD.wZjPKL6/BdYDTMjQ.Qd.9K3Dcdrko','admin','ak_6766c5143ae1c7ac','2023-01-14 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$Mx8HPzQNCCBTl61E01XWVokB9cq3MRgSfF49DUq/r0arUU6u50fu8','user','ak_bbf67dbf9cba6474','2023-06-27 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$mpRIHp51.pT8gItxyNA6s7zKnHfyc69Hv7u4tmxkKFB/EG5GjWenC','admin','ak_1c65d85ddf92c846','2023-05-18 10:23:00',NULL);

