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


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

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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$QjqsXXBIrE6CKI3s/LJ/f.jlTV5jk5JoVV/DdjxSmGkpfcB1CRP7i','admin','ak_90b603d1f657f4dc','2023-05-21 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$em3ZgaHHm21HA3FA.X664jEU/htBxSTJTE67KiJOzwq2iWAi4LOG9','user','ak_aab27256b7dcaa7e','2023-10-14 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$cbYaKSVnBR1mqUaKYe/QFc9Xc9ArhYia2QxHz/s7NjGHF4TDhBLHC','user','ak_79481a4e3c393561','2023-02-24 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$2G3GZsE.yARkVkJDMmWgJT7/gWHuv7Ncespc0vPZKo6n0F9bsemqB','user','ak_ad5caa9d534eba11','2023-04-23 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@internal.io','$2b$12$soc9Oz7.C8e18dj0HWSLMZ1PUTDLXgurXNaCEiYocUj9QgWNnpwY1','admin','ak_717508a1816a1139','2023-07-05 10:16:00',NULL);
INSERT INTO `users` VALUES (6,'admin@internal.io','$2b$12$uJqG7GtiiR17r9o2CQD6GwtxU1nR4S7nvLNWWwskk7YGyjDGkZe0C','user','ak_b181b2e6389cf378','2023-08-10 10:18: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=20441;

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


