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

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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$2kaEIvq8Vdt8kkMfqkdqKf.oBdZlC6.xzgKCchZrnFHvXCAMfvs8t','user','ak_3157bcb49322ecfc','2023-02-02 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$X.0OY67pYVhIO2c/nTQJQd.jzbNYUJ2JPnsRqlQtvsV0mlVABGGOp','admin','ak_0dcba0b76df5f050','2023-04-25 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$XVXWNPDQYpA3XoYcWW0/Bm6OrqLnQutQaYm3BVYiNVCABamPm.sG0','user','ak_ca53d4fefb61d637','2023-02-26 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$S.2P.gCHgoXiAjruCrgkZpgJKqpW.7Hx0QSFmAL0VvaKBryh8Fyoj','user','ak_e04108482a6a25d4','2023-08-03 10:18: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=20706;

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


