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

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


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=45010;

--
-- Dumping data for table `sessions`
--


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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$Zt6JIQRC8/lLgn8U9RD3lqlStHvnL60yYWy3kmdBkNIhO6QK2YAr7','user','ak_c176921ec4be50c5','2023-10-23 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$hJK5luxseoQKyibh6fg8Zp7VZEEogcqUi2BCUtE2C3kW6.qXZeIEl','user','ak_8078b181d17f00ac','2023-12-10 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$mj.rM2mHGocU2a7IbLKgqeYajP09kix0ZvBMJYp397OLm.0cuq64P','admin','ak_9ceb80c47303be39','2023-08-11 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$4h69emKIbl6TKadQnoT8XvtWAVgbHDDPBOeJXrDlOedB08rNfFzYD','admin','ak_133f32008266cf27','2023-08-16 10:17:00',NULL);

