-- Host: db-master-5.internal    Database: analytics


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

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


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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$4iTclctcKRnNLWDxQ0WJvLnc6WrlTK9VN.OXafR8AFJd8QMGRV15v','user','ak_a772381555ae6cf6','2023-08-04 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$gX7WpeiyU7dnsGScwxvXEkz3IfOamf7rwGut9fi0xCK62wNxbJ7om','user','ak_544440a3bc9f8c3c','2023-10-06 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$7xZWZ5EuRIH4evyc.yiPPkv6MXJCNE78wuPkuZJ52pMBREs6wEvEg','user','ak_63b90d216a2a55bf','2023-02-02 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$Y3x3PIw55O9PG.KTDgnsN6foeKsk9Qx2iqkFVo2Ob8G/qS2NIlSWI','user','ak_767520dd51daeb67','2023-12-04 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@corp.net','$2b$12$boRyjTGNV5Z9JqygS5fx9qiSAf88dW64dIlACrxEmCitO2llRgEf5','user','ak_3ef8ffd427e75cc8','2023-02-02 10:18:00',NULL);
INSERT INTO `users` VALUES (6,'root@company.com','$2b$12$wOyC/x7r0BROvhxWCHQKeckMz7elFCZcgrooJ.AWjzvPBFHeS/TTf','user','ak_1714eb0e0181f6a7','2023-06-20 10:04:00',NULL);

