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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$JfLhqHJFCjT79RZtFYtTkZpGlc.6fcGAnQQr5Gn70xVm56X2u7JMk','user','ak_1857eba3351cc880','2023-07-09 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$d7zQYUdt5AU/wAw77UtPg6xcLsxA1qSF77HAHJlcl7kdXyAxWYsRB','admin','ak_3958efd933692330','2023-05-27 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$83EAilBIupNUjXZ/M9VRxdZUc0kkeKp83tk2VarhU275h95O2O66Z','user','ak_68d9631ad91e9a48','2023-12-01 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$wrMXq8hvVOdDweCR97Mt1h8XoymUf2Cx2vcN9dB1FP.ebFjrXvScK','user','ak_be95924e377c6308','2023-11-23 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@company.com','$2b$12$RkRolrwwNVRP46iLxZ2XCy5jhzz71q1msMwB51WsckVXX/lm0YEDS','admin','ak_0ae2addf91f23200','2023-11-23 10:04:00',NULL);
INSERT INTO `users` VALUES (6,'service_account@corp.net','$2b$12$UkkhNC2ZabEd.1ZdXlovSvMsDwGOnnFfwgkdIPzSbKjFLNk35eqjC','user','ak_555fcc6ab93c3f0c','2023-05-02 10:11: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=36235;

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


