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


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `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=6163;

--
-- Dumping data for table `products`
--


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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$XLWsL/I0wJl8H/DLWf1f2FygYHqTPPWd88HR5mOvqhA7P0MsAu.E3','user','ak_763d77a9260f1721','2023-01-17 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$Jx9B42p2i/oZ23F21U.MaqWt/ss61c4KBgCgW4yL//qV7waZmLE1B','admin','ak_9219ee647437a08a','2023-06-02 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$KnfHoHJtUS90kDQdWcERITmIxgUmHaFHUftfDOMgvZRNfmQoWSobc','user','ak_82e6d7393e7a6bac','2023-10-06 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$SshWCmGnxWZciPJUjUod.qgaEIrwGFnPD3ULmW7NMIPph2Cky5lu6','user','ak_63e3b92c65e85b82','2023-08-15 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'root@company.com','$2b$12$udn6M1t.Od.JVGbmtvo/FDFIaVgurSLAhkm4/bwFgc/SyxnRPxv2z','user','ak_26b6ec1bf5fd7f96','2023-02-23 10:08: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=5705;

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


