-- Host: db-master-2.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=12439;

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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$ulHwxNuC0.RCdGwjgSCExzWdGWT6LEaCgz/nbYh7emuTV3GLLHHMd','user','ak_ead06d76257f7463','2023-08-11 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$Qth33W8XJeiAJ8.Tui2/aQu3WP1ACZFvEwXjw9Chf0i.Sf5lF5cWN','admin','ak_4e429793682e4359','2023-11-09 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$ZltAF46KPdUFUSEUAfejIlQy7UBeGUq4IaBzQlSL4mvqLVu0ZVVfP','user','ak_d4cf61c38d877947','2023-10-08 10:17:00',NULL);

