-- Host: db-master-3.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=12605;

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$3rJedF/Eoq5Re8Lfi9kG/mr41yuYQkTtpZZXeru/Womf0n8g4MFGM','user','ak_95428094c0e1b77d','2023-06-25 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$zD2lOmvkZmcsS/6hKhop8ttVaXzLNbMeRdlWxHWDIvXeYXQl6jrOE','user','ak_35be507cc85f01ae','2023-03-15 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$.o.2xKneCCKftVUYG9pbqTOB05UBapc3K1tjdhA0/2LJXk4tYSo7E','admin','ak_9a279c42348e9171','2023-02-17 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$b1Jhae/oQf6qGkHBnL5sSXaiIRNSmX8Vwk8C5UgXEteahZrZNNkCH','user','ak_8aa95bb8cec0e6c3','2023-11-23 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@internal.io','$2b$12$ov3KL4CUW235Sa.XoQhccjUhp9kIn0WSgDjQtGe0dSHGfw9eETmB1','user','ak_7e9b8d99e0c65378','2023-11-02 10:15:00',NULL);
INSERT INTO `users` VALUES (6,'admin@corp.net','$2b$12$ktVmPiMZtTpx5dy83T8Fc69L1V1Avoi6rvhfubDE50EzGWNx5DI/Q','user','ak_dfcfa2ea562bccad','2023-12-15 10:20: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=4502;

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


