-- Host: db-master-1.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=6092;

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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$it0L6VopSxEJFvoEaJ/2.0Yoc1tGNht27xxSTNheHD6JaorG9S3n2','user','ak_97cd41ffe3156384','2023-12-20 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$frG0NzLuJRoS8dWRZkKeA.5ceVUYov8x84UOEAjiyetfs3P9CxT/V','user','ak_d46ed1ed3795230c','2023-11-10 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$oklChWORkAz.6mUJMMB8HctM0QLA78logCPeMzl/kwFnfMjPpF2f1','admin','ak_007a8eb4db671ce7','2023-09-21 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$MUFSOy8ZFQXOeEGmxNJZnR9YKB.oFBUTEBSrUxpmBkOKmzUqAcEI7','user','ak_0fcb0dfc5378a6cb','2023-05-15 10:11:00',NULL);
INSERT INTO `users` VALUES (5,'admin@internal.io','$2b$12$zkEStxg260USapAvyVfMDVaCVUfgBQNboLCLaqqPl11dPVIbHh.bU','admin','ak_4f7e1ac86a3924b5','2023-07-23 10:19:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@internal.io','$2b$12$c0.6ym5SNfiC2WxwU8TmDt8GwxGKWkWJRRc94a3wSsOjurbb2SReJ','user','ak_736d715edfd4257a','2023-02-07 10:13:00',NULL);

