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

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


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$fayzty7bbsTwY/X5gGLphHb1ghdwU1lXGLRI0MeYPJ2rcVpgp2TrC','user','ak_8e65a4d1c33ae610','2023-09-04 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$iC4JS/bsmFZUyP/M2gudQe3UQ95Jz/ebPZOoIcyr1sV3oFAnwzm1s','user','ak_2d2f2ee14194c7a5','2023-04-26 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$FZgp5R7FkFkFWG.h4mMojfHl31IeRB56N1zSrn2Po6lQ0XZVlq3cH','admin','ak_d6a165259f59391a','2023-08-25 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$iGHIqrWXr7paEzbS78r33GwXMFPGRxe7RVc3QC9m7y7M/II06MHhA','user','ak_b4ce535bc909399f','2023-11-19 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'root@corp.net','$2b$12$WAkqP2vgT1hb6.jNR.H5M3qdVpu3etwf0E7Erz8KuxBFVqgOFm8kk','user','ak_badd582fd4aa94bf','2023-07-08 10:04:00',NULL);

