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

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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$YG8L3vsrnd1xmEC6l3zmbeGEJJmqCQft1RX5Doy67FAnW1E6ufICZ','user','ak_651562e6ebd14535','2023-03-10 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$Ur9o0eDRF8LXP7mps0E1cqs6bdSdyOqJcXcJPFvQaLzWkC02pocfC','user','ak_7e3a8d9ff20df7dc','2023-06-26 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$fHJXF2PKiHTF8fjt26WfqBZSW/eWibnTPT3GJeWPaDGchq6AmQhrR','user','ak_0cfc86e919e2a495','2023-05-22 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$coA07Q5c0F8EkAtSKG1DtrO1O0E3PVvfnFapmbJzq/w7BQB5WzHQo','admin','ak_1cecd7c564ab494f','2023-11-19 10:11:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@company.com','$2b$12$5bfgIQnemsY79RY01tpyHUi5briXL5h18xNwipMcVdgv2a.7rQ9sh','user','ak_82d8bc9a57d503da','2023-05-26 10:17:00',NULL);

