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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$wtwkMcvemb6BgZnL45mhVH9CsGvlcTMxTw6oJDLXTq7.v3nr5oUni','user','ak_06878826d3856726','2023-08-02 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$1Zm2MXBa8d4qWRKiD.9z49oainZ65QpPDr8TGM/ou7r1gw/cDEokE','admin','ak_eea6cb1819b58930','2023-09-17 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$yAd3yLt12TpNAxGcnZkp5UfxHGhxjlkwFr0Yh6wXY5qjD1jrLQs8P','user','ak_322afeaaf3109726','2023-01-21 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$pqr3CwtmY9bbAmBwRikO4YbrzjAlUDhFbbiyGgMsegLbT8rFATr8a','user','ak_2efe09d147f6c346','2023-08-08 10:18: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=50188;

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


