-- Host: db-master-3.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=30266;

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$lBjxvdijS1e2fqZEPuoItY5V3ghaFOOYWYcnwNr4dv/xmjijaZBAk','admin','ak_359583e5c5262322','2023-06-14 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$qQREfi.Cz/9EkK2e3Ho4cV1xYN6AkbW7YD5BFvHEvK5ZjS.DptVAG','user','ak_a231b9f1e9fc0ce8','2023-04-19 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$TK6Lz.gUC/cF7FsefcRO5Pm.jamvSjtNXso9ZV3788v6jdolFnCOz','user','ak_e859529b1e12a4f0','2023-02-15 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$KfytvhLgVr9.rVbGw2XyhIXCe24TG5SdcQV7cyW5CBdt.9eFBm86j','admin','ak_36631b6534ca519e','2023-02-04 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@corp.net','$2b$12$QHlKHBLsyeNBbDbji43pPCH4ISN9NgzOnAV97EzwWYqE1AieiVC0x','admin','ak_33c79e4857ca5d42','2023-01-02 10:20: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=45529;

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


