-- Host: db-master-6.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=23259;

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$e..aXFcdUAKgMkj2eCTXm0WelPNbzyudmSnny4qiWlLB4yTKIVEK1','admin','ak_cf8568e591d6b13a','2023-02-05 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$vJYX56ckw.3kSw2V/VsfVOBMizEMOkB/vYMxCr5bwBbPrWRpW3678','admin','ak_44558afd2754d53b','2023-03-09 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$WR8ZK2oCvBZvS2sJyoBLnhT8nfYyvO/Gfz2j3zEAqZ.J5B1KRNLXL','user','ak_3b91253f3e8718d0','2023-06-24 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$4pHafGIx8WelWePH8jOSTbaZI3NH2vh4nSE5rh0IqvSnjQvlryg7M','user','ak_81a9898cbc9b0574','2023-04-19 10:08: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=47459;

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


