-- Host: db-master-9.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=9155;

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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$VnuSzAEFOTU7ACv3.iQnOnVnIzi48B3Z7bXuKXjfQ3mWGnxwYCnaR','user','ak_211e0b6e7e04b378','2023-08-14 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$oq7JHKkPA7HsY3buxSW6EQTB3/6nTiRmvG9F9ZEUphKp1Tm7l.7GZ','admin','ak_e96aabb235e2628a','2023-08-07 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$fzMiJZM/Yd2UK4f6embjoCs2M8YewqU68tpaAkF1lmsi1PWLpduW4','user','ak_8ff42a7303147148','2023-11-17 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$DF69fidMeg62iNHU0VOpeVnICtQWip/Rg1k92JY5DgbfVxdVyjxC0','user','ak_ee0f30baea307ea6','2023-02-15 10:03:00',NULL);

