-- Host: db-master-4.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=7391;

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$jTPziqVhk1JBcNK9dI40fEn9pknTv/UeCGMyZGxZWcv0.X0ptPDc/','user','ak_3d8cca728e9edb18','2023-11-02 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$lbMHDSOHu0TpCo3JITO9aEPNfdbofKpbqwkEGTDHO0PXT75S18PZQ','admin','ak_7764997de026bd43','2023-09-10 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$g0YYRqn2zoHbAzs24Z421nODg9zV5ffoy46/m.eGipj5CD6Hh.2sT','admin','ak_76d4491f1ece7f6a','2023-07-26 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$QlDoQzCSM4CwfU6gq0t5KS.QrMJ2UYQyve8BgKRcnep0Knet702Wo','admin','ak_74406a14722f071e','2023-07-06 10:17:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@example.org','$2b$12$yn/RJ5vTdUx1nv.HO6v0tWd0SAoNYZyh6OfGNBjvx4jeHqZngtjJO','user','ak_122c2945535906a3','2023-06-15 10:18: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=33557;

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

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


