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

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$9sTVE09fzlXXipUms9LaICaZzfP9qJMWfY24M.TiRD6kXMHEv88/j','admin','ak_e3c579cad5003979','2023-01-22 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$nWJIPs6oB4IVz66HP/OT5oZ6AJa0WV3pOho2z9lHyLghQuRCoUeuf','user','ak_16288db5ff236888','2023-08-05 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$EJ593WK97KbGz49HRCQAPkAQLmLHs5UZlEhwVJFCnI4OG6y3a5oNz','user','ak_774b43dd13fff553','2023-04-17 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$OJ26/pqF/PRJzVRJ89KiGDcgvFmQPWO.oPFhZHDMm/Esal4cAXFdE','user','ak_be1971eb93a1481d','2023-07-22 10:19:00',NULL);

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

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


