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


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

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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$o2row521Y6ZmmS6s4YqdbZy2Ulsf0jAeP1Z7vNBUia3Bgm9nEXmel','admin','ak_4bbe07d3f9f2396e','2023-09-13 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$YfivwDRb22N.Ii9evLShBj5PbAbXndWWUdcAbpr4Ordgk/pBZ4TBq','admin','ak_8093e64a6eb353ee','2023-01-09 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$jDiRomd64nt7HlaRj8UT3re4sy04U5zVMnKK1esNvoxEU16JTMuUa','admin','ak_d627976fd8ecab9e','2023-11-09 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$0/f9yEPCJnpmKAfdxtleti.5vcorV9EW70VIONGqipdWrFVupvP/r','user','ak_97db854106ec9587','2023-10-11 10:08: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=24664;

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


