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


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

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


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

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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$Zmj36EjmLqmNHC.2PrVLXzrrMUUBC8js3JDCaYhvbdMhNjoCiSSGh','admin','ak_1a4b3814b4459d93','2023-06-05 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$WdsmSYAsnG1BlJV6sE2aqHyeu6W4Y2UZ/7GiTxmtDyyr6XhF9vSvD','user','ak_eb9596effde0d4ce','2023-12-25 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$g2vc8qq6Do7XASMGjLwy.5Wuw99JqDmouXoxyoqqRPzBOlUINQNq5','user','ak_ea826687d4c83c15','2023-02-01 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$ub27AsDZpN2OUON.n88lwX8kMLII3hRgmSScKgCc6g4n6xWqWbXG5','admin','ak_aec0baf240ed0d20','2023-11-28 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@internal.io','$2b$12$f.hjH663HkvEkTwgBnHHU9LeKc2K6W9UyIaUbwPzGjJhKamzHQhE0','user','ak_0953018df1fd43b4','2023-11-14 10:04:00',NULL);

