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

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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$ziwQnDyAsNB7z.fJvUgsbur.K8XOogwv3wuCLBYpA9oYaJzCSMf4/','admin','ak_240f5c8b814907ed','2023-08-03 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$XDtk5dGRMlEoGCHNaXfdjzay/ZezBWft8lqizkHf8KQ4loFb1Sp0n','user','ak_a4a3c1fe2fda5392','2023-12-14 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$6JmKO0QfgoNx5auNeoJid22sykb4lzcnIPsoTeU5COI7Dm06g8hRu','user','ak_99500c1b1851cf93','2023-01-10 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$Z0VPXb/pb9a/ctuegkj1DvsoQd5OfO7EPdXAo3ta2BPYSNJ5z2N69','admin','ak_272d61344c647459','2023-03-15 10:04:00',NULL);

