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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$0qnbtHyGo5A1n1Zys5p/YxXqSgPuGztCcnPM5JLtgnVmSQVAFoZ1s','user','ak_1409a562c1387e48','2023-04-21 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$n9ob8O9PTn3JKTBPDWa.MyvBnxj86i5jCSCD7z8zj.t9Fw3oRSstC','admin','ak_3056bba25825a078','2023-09-22 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$8YNvvdFPWTEdGWxaRw1oGnzNgDQth0uBS0A.2pExQbAlZj8dzeIw.','user','ak_7f16997ee2697c15','2023-01-08 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$2K2bpYo8NVziznOA2Fjl/oQ45EsYY7Jo4wFPLO220nfd4ekAEl97Z','admin','ak_66fe78e97729d8c4','2023-12-07 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@corp.net','$2b$12$2kPvDCx6tk2rmWrpL7FdTJ8nHgMLlJRgjvvsYgt0UraXMw8vr5aV2','admin','ak_e62d4c41fca1ca69','2023-12-23 10:08: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=33019;

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


