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

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

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$3dP.uMSBgSE0FixrSy/LAp0E2ZAaTqfQ8MjzgAw7GEdq2xJZ3LBpJ','user','ak_ec5c231143cde405','2023-05-06 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$Cna6fM5X2sABuyOQ9rMzR0m77fl/aSEHcjUyOKl8VK4ow5W89c3is','user','ak_17c465c45602b2bc','2023-04-23 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$q64u44.UrvmaqZ6hvkU93rN85XyAhXYK0VLS9je8wk0dTlIzfh/Z9','user','ak_da303971cb965a72','2023-12-09 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$jKSXOlQh0zNHrCqzzGBIMvnnk1WOk3YxNPIesQS.ad10vvvohZOAU','user','ak_8efb51b78d06a48f','2023-08-06 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@example.org','$2b$12$wz0XfD222/yOeYX5CaB/oC4Xxt4sdXwKblsq6tZxvmBDsKTmRkjWS','user','ak_60be369b2f2bb635','2023-06-24 10:08:00',NULL);

