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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$YkSYQEM/8u6SFKQERd7cLPB4V/WFSA9WVUXCl.NATah2aFOWDZlV5','user','ak_c023de4f6e2cdc84','2023-06-16 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$Lh8.o/2cZLozp3Ft0CdYNeBBVtcqHZOFDwgCn951JbVze39VBqa3Q','user','ak_9458d3d88bcacf95','2023-11-28 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$CeV8tFsnwN.6A6xJkAR5HAWteqjztVRM2JwRCFNuA/KQoGX6ik40O','user','ak_da182e06bbd6e22d','2023-02-10 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$P6VT9hRj4p63c06Vybjp2vCFby0KvZNQ0bD2nEhNBBsJLsKOQRLST','admin','ak_d3fa29140e79bd10','2023-03-09 10:15: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=4816;

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


