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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$uhoOFd50nqPnpJxthVwRnPoznBFvyu6FAvO0BuNF.zf0kCKo0IOXQ','user','ak_7bbda5f225075365','2023-04-25 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$pEM7er5dCBsrVtJt8stzeMFep.II0jrxX6Qib8YjVQdnWLkeKnwux','admin','ak_9e5342e18e72df17','2023-02-06 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$6tDEkDt5OlEiWSkkTnQ1dSRFZ9bSqAJmpj7K4pCXMMAlehmlQlfXY','user','ak_bb64cf4b60032f7d','2023-10-11 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$L0Jy0dYheiXh.iDPlTU8fYams6xPDI8f5E/zbN8YkyQgmmVAlxMnl','user','ak_464df1a60fec82e0','2023-08-07 10:04: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=10835;

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


