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


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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$A7ZWE17JIL/Yn8qEBoTRyGLRoY2BYtc/lPj40SZ2CnC/kZrhf/FSq','user','ak_11ab956f6e71337a','2023-05-18 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$ZFxctvjI0aVAVqGuvDHBTdqog8mCzFFYpwSJ/rtIFTj.3hsk7zU.t','admin','ak_ea3639926b321a86','2023-05-23 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$vKwawEpD9vcindu0USK691qhpDCPJ9L8YBryEb9ERfVXm3BQJXokY','user','ak_4475452c1e22fa11','2023-11-08 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$TZXa5fNRiadsJXlD9o7xmmDMcRtjUUfb58JKUVPBylTamaFRT8WKg','admin','ak_329a1c3337b766b3','2023-04-24 10:06: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=32194;

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


