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

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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$67Z5qYjCZgWji1gBJkPLjQ3iFOzlQXogBgNxZtCz9uX5gQpYxPawz','user','ak_1fbeed7321f4a4d1','2023-08-07 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$Mi7fIvunqOprCZGmJAhdFFW/TZNCBhcqbWid2i.hUn3NiRdFDMBPf','user','ak_30585adfb3e8d3aa','2023-04-14 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$Bi3nJ0mhQr4PYdV4AKY9XH287cqwzxezAlrM8X4tFFB7AR7rJkrPB','user','ak_44db78bfaf3cd947','2023-07-27 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$yoKuIH8LABg5gl8OlMOSPONOmD6ZRzG/AA1XL6/DalEb9.Bf7pV4k','user','ak_7ea5a787e52c06c5','2023-05-12 10:10:00',NULL);

