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


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=31961;

--
-- Dumping data for table `products`
--


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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$nipmwUSEgygmIoKsIe4BwSTexElSjf3.Us0rj3emrXizeZsYKyCuR','admin','ak_2584a757d27c9f17','2023-10-21 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$qgkqujGdSWkitNsqTjeqiOTAC1Gm7Zr12ckEnCIV9WX75M6YxUVen','admin','ak_94b77dbe319e2490','2023-07-16 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$yYAN2d9ifihM4qKoGp5oubSpDRYM.RVnbo4emp3YEY3q1dZdtR2bG','user','ak_1885cad65650a78f','2023-10-04 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$Jd3yJIpD/5uY6Q1LniSqN3gpt2xSJTAI.lYdOmsaHtAEW27r32.BI','user','ak_f2f3766de0b4e843','2023-10-01 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@example.org','$2b$12$Dr6/ZiaDbVOpO6Jawg9Zyp22YkmqjcToVkISe/FyzbDMJdkaJS8V4','user','ak_6e2ac83af5ac9a75','2023-02-13 10:00: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=34645;

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


