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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$LZWrBdNvjybFRUm2YLyR9pNMxiM2D9zyZwKj8dMAdLIBARZ/FSGkM','user','ak_df11fa7729607074','2023-03-15 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$EOS3t6C5oCoAaUu4Eb18lMiiKMkSPRkubuDe2rtBl5mI7SZ8OnTCW','user','ak_3d69df9a70725ba2','2023-07-26 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$7d80Gc4hcfb7rl06EVHKxT2Y5fUSVMj7W9hdbcAVGLC9RpQpiNY91','user','ak_21ca1fd839ae3c2d','2023-07-27 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$EYIpgj2h1jDsdqiqtbsXqqm3DX5LNkzNeCjoXYvJhrRCY3Q96ZgHF','user','ak_c7533eb839ec240e','2023-03-28 10:01: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=46424;

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


