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


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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$RcnedLGkvtGJaOMCs.DkkmuGRa65dZ8cGuoD31V0FGwpI/9PgYmbq','user','ak_40c9f9ca82686c81','2023-05-27 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$JmctntV7TKx7/LhpNcue2SjyZ4xIk/qk.a6HK7E1oMH7BBKdjA..7','user','ak_5265a0a4e29f74d8','2023-06-21 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$EwFEKwfxhStlYHd7PvfVkkaL0I5C2qfYLBAT6RA6YfrrkjH7hqLh5','user','ak_37a59ea461bb505d','2023-12-06 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$awqS2wQyJYrhspHHJqxhoe36WYocbJ6327tvzud5IHlWPXPaw.Pr4','admin','ak_16891b7226c0322e','2023-07-18 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$c1cMRDU4icsqh0zKwHhUBSWUCpXEJkqfzuoptQS234vhJwDHtMJBv','user','ak_0f232bca01066f1d','2023-01-06 10:15: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=9973;

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


