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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$aIMA0tU8UlqTtfvxyHs3of7EhgltBaJJWxFhA4uU.9UsGcfAZuEXG','user','ak_1f2647dc1e178a00','2023-12-25 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$7U1hL8itWgUsExdlszvQHEbnw16oT3KPXFhEhEYIMxsJi8oSUy1Po','user','ak_e878ef32acf16964','2023-02-26 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$zdHEThpFS8LALV5IWgGga6KYHGkCH7Zv0XHHI5sHZgRDL6ns14mmb','user','ak_64730f6967917f9c','2023-02-23 10:10: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=49101;

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


