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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$1NqWVjsuLfve0lrp9T0IyWRR.pDQjbxbzm103t3UQnqFHkF53k1sj','user','ak_adfdcc8b996562e9','2023-07-18 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$sPxWMCZ5eBKRmyZck8W043e9iEU54uODVs8CF9BN1kJ061/QURjPT','user','ak_a9f03b3203f28633','2023-01-26 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$Ahmqzy25TtNRE7Od3gylN2HY3ZScbjjsvZEsXIEW..Nh6aB9D4FwT','user','ak_1173df096a4202ef','2023-10-11 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$99iD7OlZEDbffVFy3w9.5ny5IocgGLLHph6dkux6q3tHHZUuSLdh1','admin','ak_6fff3d4347d8958b','2023-08-15 10:17:00',NULL);
INSERT INTO `users` VALUES (5,'admin@internal.io','$2b$12$flaicBX5wy4XSZTWiZ3mvCaYNhF9/TLRuZwxRgGxOPlKVnk4kvpf/','user','ak_db670aebff863967','2023-02-17 10:11: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=11267;

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

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


