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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$zVY/8vXX2N679Wy7Y.KRtI8GH3Z0j81u9nw9//h1jP6zBVG/.SCkT','admin','ak_ffa63bdb173a7dbe','2023-07-11 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$qsAKHrsBUBCjt7cVkWttnUCHZMaEQZNomVOaCC3bg9hWLY/MIEtsd','user','ak_10a2d03273f5e9c8','2023-03-08 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$iHlW9gEIrMERL1ku595BqJVzo4UuB0olhwqLlocM4zCDtdggXeQ6H','user','ak_66eb09d1d6788fac','2023-04-10 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$FjjXRQwb3IJs00HjD6YXk0gWN8eMR0HvnpqLBM2KIGXPn/.EuQGaH','user','ak_e10c7310be428e32','2023-10-27 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@company.com','$2b$12$2jeI.k5UtlKw/LY95Plbso0jO8kFNKA9EhRMiRHhll3IypKtHlDCU','user','ak_8126d735e8593f28','2023-06-05 10:04:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@internal.io','$2b$12$xPMNJanJ9FuOGZcjWiAElay3cgm9hMryvZzILJVRBF6alWZwrbGMs','admin','ak_f763808de2cbe9ec','2023-02-22 10:04:00',NULL);

