-- Host: db-master-3.internal    Database: analytics


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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$voE3YTSJpnh2UgaiZai9YocQ8jVGDS.jALXGzOn8lnhSiT0vg/Dgf','admin','ak_0e87f29038dae762','2023-08-15 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$BT1I2Y6CiXn5IU1q4KYvUTscL67ET9h3bIoBi/maHxnNpiNTgU6w4','user','ak_dd9a320e852a2503','2023-08-28 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$mo5tKDRuPFNfrReBFapj4zRTg5cfvnvVCwWqzsStTGr6rJ2OdsH9r','user','ak_b11971d9b69efe78','2023-05-19 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$kzJgvUcVn5bV1TONGBI42gS/6qH40g3d1FpFxtd8h7M/Qw91BN5VF','user','ak_9ae5ad3f6be94315','2023-12-17 10:01:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$7U37nsaLqpdLI0w36tWsog2iDJUn5Behl0dL6x6L8qtIqvMcl514h','admin','ak_2db7fa1a30337903','2023-10-03 10:00:00',NULL);
INSERT INTO `users` VALUES (6,'john.doe@internal.io','$2b$12$4vKKCQR4.vdfzj.uHjowFuL4FOjtjqTAU4phTo74jKKSRcA.CwrNj','user','ak_d5ca652ff4481ef5','2023-05-04 10:03:00',NULL);

--
-- Table structure for table `payments`
--

CREATE TABLE `payments` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_id` bigint unsigned NOT NULL,
  `stripe_token` varchar(128) DEFAULT NULL,
  `amount` decimal(10,2) NOT 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=16057;

--
-- Dumping data for table `payments`
--


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

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


