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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$ja5c9KkWzJ6RBuwGrM7cnLUK3PvZ66rxzxrEysUwz0mH3he6xt9Fd','user','ak_92d7c5414b073ed8','2023-01-17 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$ZhEZh84JbBPbXAnZOtko8s8fwh0zTn4d1WOgiA4mz1OielfpFDuWp','user','ak_e13d94e0b07215cc','2023-10-14 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$byCYqcu5aYCjysVy0wyt.U6mrQpFkzu3r.FmIRCCRtRKrl47O3Gwc','user','ak_bd85346b9792bcbd','2023-06-05 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$1y40.HwTS75.rPjOszaZzwJFQz1hMwUBHs9arr9hB7rZMvCX138F7','admin','ak_5f2279dcace48667','2023-07-01 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@internal.io','$2b$12$I.jfSMa42/h1cD5TvkU9RfynpWEvSH6GBMKDGLTkFgIihiBWWN3cy','user','ak_1f3b29404763b065','2023-11-06 10:09: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=46562;

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


