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

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


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

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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$lgmCFFyELXea8kS3JTJcI9xC5tE8zcsGEiVw3uVgLn0F93qEO4e0f','user','ak_88d64682072b2b37','2023-04-13 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$xQiWYWGgf0VjJLkqJ2gDQxjgfM6P.mrirg2.HzzqmrQVDoV2X.RDD','user','ak_0c853b0c321cffc3','2023-12-13 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$4CotHrbEoVDKH7oIIyNo5K.Z2BN342IjzgVsozgVTAodWariQNkzA','user','ak_a5d28f804eb9009c','2023-03-16 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$bZSEZ6adMuPecqL9Cn8r5FUrqXMmdzTzEQQE4qhajNyuxHaFT0j6E','admin','ak_04a3ef5f6f29557d','2023-11-08 10:06:00',NULL);

