-- Host: db-master-5.internal    Database: analytics


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

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


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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$3T.sJYvuBBk4KrSxVAH.2QdCoCM/rQk316id0eXoZ3sqYqlpm6Nwd','user','ak_257968497b559395','2023-02-14 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$Dc6q7RFk.a/f6jjNdAXfZec.sPqtfpNVaQzV6K/nOxQr44SsmiOsi','admin','ak_a7a4e63c8ea4b7c6','2023-01-19 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$FQgSTMkSwNANDqD3me4XiZiUUTuFm2.uac6rtbcztbc0dQXMA485a','user','ak_920f8fb5ae1f8c09','2023-06-09 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$1QPBvwsCZ89oDq3GOxGXsM0q2jJ63/O3Vm8P3Gk3Sq90UKUmxmocL','admin','ak_4eae5c37eeb82dc1','2023-02-24 10:14:00',NULL);

