-- Host: db-master-8.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=2503;

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$l2F7SYltAanesm2aumgf2FxKcgpwftAl0ngCCV0kEVoF4ayIU8qX5','user','ak_fb11ca186aa15e60','2023-06-02 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$Vo.QlpvaEl8HowF0Lg95fwl2iRi9OHURUEHo.r.JwP.n8SVkr3wj/','admin','ak_b0494e7b6d1e5953','2023-11-14 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$Tluk8sxhVxqQk9Pbd6SwdbliuwBkbWccTHFqw8TvfgG7W1qRT5Qkt','user','ak_8da4b8e54519b7aa','2023-01-14 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$KLol2.FxkQjJIYZ5E5HG2t5IaXEHpMurypGBo4GJ4GvAJ03W4e.0g','admin','ak_2ef400816fbe6b4b','2023-05-16 10:01:00',NULL);

