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


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

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


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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$u1nIa4tOSdP9dzu3w9YPLTBwW492v1dMZCl3hXzOwfvlBETiftHOq','admin','ak_733153a74936db59','2023-10-26 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$eIoDIffZ4tsO1k.kxjuWvtZOVxPq1oTy9l428EFQPuYPwtYv.avdB','admin','ak_7ef1b1ca56004d6c','2023-03-25 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$EPKR6KokWfxhci6y3b4wiCaebXMC74B0TXvHkSTFw6PUUjl6knm4k','user','ak_5033b9c64f7df2fa','2023-11-25 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$rt/1WgVYNtVScKbOqHEgCunEbv.45xAL3jvdkMNGDOw.fkJ1T4dXg','user','ak_956e9c35ee242362','2023-09-03 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@corp.net','$2b$12$d6GHBO6RaqsZBJspWCqcBMu94cD7y/G9X2achYDVnvka068G68pf1','user','ak_4acb97d1d8d13f2c','2023-02-12 10:17:00',NULL);

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

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


