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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$dQYmbJQAqg3jz/7cC0VFDgfmuO9wnlwDIus1F88RWaIfrCOrGQbf9','admin','ak_6ee1fab2ecad8742','2023-03-22 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$WKDSe4Pds0tqH4q66LSRhGBfK/6VCb4s.4s/ntIMBAxBHpHAegZD2','admin','ak_9da20320f3b3d7c1','2023-07-17 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$qKXzIl6PsmNOgJjEp2dJ3spCHH.m.q73Sv7u1wPuw21oGS5b.atcl','user','ak_7d7e0a1fc966d9a2','2023-06-01 10:13: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=47654;

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


