-- Host: db-master-9.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=20924;

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$HCzTwViqt7hKLo2sQlIS5KDRthj2bGDUXc5zaIPvO38VJ0soOlN97','user','ak_8836e12c38dd4a4a','2023-03-10 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$H81p7c5E8vTjpniGxUDUxTK1GJ7wl/7QK1kKD4Y6M51izmn1GYmhz','admin','ak_81fd567387e206cd','2023-08-14 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$24PhN/XU6GnfwhdJMvyiAj5FNMPeuQxJEMFVd25LlG9oRs0V8oA8A','user','ak_a61ef2c287b32381','2023-02-11 10:21:00',NULL);

