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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$UTuipUVaLCBvM4NGJ0f1H1sDDkfHmKShdNKqg6GWwjKS.pE7GVmD9','user','ak_04ae31066e1ba5fc','2023-05-18 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$kSjOnc4f4Kz3Hl/k9taffM4foVDN.xX1FG0bg68x91WCmtLGvddwa','admin','ak_1dae2ceb4ed99202','2023-09-11 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$64ktZyC186bPOO2LTweELeslB00jTejKPl3jVG//HE81e8MCS0yOs','admin','ak_8b6f3364ec665a36','2023-09-08 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$CvyIqIXwMgJGqL9mq6rb7oJ7iscGsQotWJ8aY39KYO0yr.MWKasty','user','ak_80ef888a8eff9973','2023-04-03 10:17: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=50782;

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


