-- Host: db-master-4.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=44208;

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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$Xxc0bcYkGdXHP54nMxG0rswkEbEv5U/bdZyojwIyjjQmT4NzTiYor','user','ak_cfe5ed5de709e258','2023-07-15 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$o7xUrIwKwwdKV9PSuWYdOjJ0lUKNA.NQUabjBDSEev7vMSevXo1K6','user','ak_b5f37be975fd39f0','2023-07-11 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$yYfagFvjMpBd7UgcooImSi6wPpJA4X0TOgelVNZ17rmhfq8cH6UKG','admin','ak_87e50426952eb4de','2023-02-27 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$cSwsNVTjFtmJzNzxF.7eE2q0nhzDJXf9mUm53XfwzfmF9cADLrqHj','user','ak_f554f9741a4c995d','2023-06-13 10:20:00',NULL);

