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


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

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


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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$vQ6Qd6gdACqOr0uNgIU.99D1rVbpUTNhmyB.dOpSB4fSvc11bcHLt','user','ak_257a524bd0426b45','2023-04-23 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$WdsfVGEiRXnu0kurkE4yY7JqnBqxcvdKc0KDlaSpNQRhbvqGHlh0t','admin','ak_4646b7399f8a10e3','2023-09-24 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$r1su8Zb1OzCTUCRyXAisXGf43iZG4Iu9Y0Jj5Ouj.cKe5FjojI1d1','user','ak_e9e9dd61425d625d','2023-02-16 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$UpMhT8FFKl.c109sSyhEarswbrjpnhqqwGANb32UKhQ/6h9ODYMmX','admin','ak_7c195254c557d781','2023-10-24 10:11:00',NULL);

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

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


