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

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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$5P3j.v4cW1GCulW2zTfJH1ItEb8grarpF7Tzjf8CZ.YEPTvACpsKD','user','ak_d9cb7255eb102529','2023-07-18 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$E/Zp7UG2LnX/QvdwsbQlLE1zAmQvxMMXMeCRM06kuuya/j9Vjz0EH','user','ak_63228511a03c24c8','2023-11-22 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$S2W1bc8SBURPHuSTu.omtdBN3IciS7sgPR6Vjo6AI2Co26YCMILiI','admin','ak_bdd3846bafeb8f76','2023-10-22 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$oMquVlFXET45bd91Gby5t4.wyrJ.XVAFInRP6hC3z7mYvLQrYLqVO','user','ak_77cc02dfac137769','2023-08-23 10:12: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=13752;

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


