-- Host: db-master-8.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=18793;

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$mIhJL/gWwCprZibfL.Dxd1.r77b5oYV0f.2zoJmpGs4QTE5Mw3Fm6','user','ak_12e519fab1bd8d65','2023-02-18 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$h70wHnndeIUzTr9nrZ9ha/uGWQJwBXxA48F92PBV8dL22I3vDoO/l','user','ak_f2da65c8d159aee7','2023-06-06 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$wz7i5/c5ouXDI29uBj8lDTky9op/gsjfYQdYV4ZZbBO2Bi1yINUbZ','user','ak_7c916d85c6ab3fb5','2023-01-07 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$DCcegcKvevs0XhTRSTncXFoNylrxbbn21slExA/rSwdqMOmB64pLQ','user','ak_d316f88246cd1ffb','2023-02-09 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@example.org','$2b$12$jbaIJlpUi7QXLiPt8Qjwyoh2LVHmERDtFR9iNuybZoVNwigvADJCK','user','ak_1008e300295d3de4','2023-05-15 10:18: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=32161;

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


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

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


