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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$iDuAaMVstuQt1u9wFtes.MvlJzrruXUqWAD9VmmQWYXAk5D9/6ex7','user','ak_a9d403c98def7eea','2023-06-03 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$RFJ2NTnVcTj68R/./70jGqfYKTrTmQC73crdMj2mFHoJ4YR7bMn5H','admin','ak_762be8885cd74a4f','2023-09-26 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$NIvxFtZh2EDIo1M0DvPCzqBWNY0eX6WGb.tecOoxnBq6pwDPXI/JK','admin','ak_5af6332149b26c8f','2023-09-10 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$ixTGEYhhHRS.jmWeeYFmL8tc8ilhdKDOy6Ae58.Hi7qNQzOUk8n7T','admin','ak_81bfb8bbd8dc8e51','2023-07-19 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@company.com','$2b$12$VXja5N4.SyTIvd50KeTOBYICOlG8kVGHfDwbo32H2iBsxB8kcw2Se','user','ak_f9ba57de3d021aaa','2023-08-01 10:13: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=39544;

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

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


