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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$OppEMsoRDN5NzBUChAYkKTPeutb7XBtNLtoQrVvUo85zCd3jjEJwt','user','ak_7b125d210793c240','2023-01-08 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$NjfvNVlqXb1uxHcHaMDQB6bfdRmSsoRMyV/HH03ZODtl6vL76ERAH','user','ak_c3c9d91590a2941f','2023-06-27 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$Qv9Pt01aB1OcIxqod5eVf3jhEaBX4SrGUpO5xq1RNBywJz/5smdkj','user','ak_53c053fb93d35641','2023-03-06 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$F60Y7HgKwEideJMUK49MGcKTzNI5lOUrrb6SpM/U3RNUJY98T3f.s','user','ak_61faf6a5bf045b41','2023-05-25 10:09: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=19554;

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


