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

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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$eHM9BEj25/j6DbS08wrwr6e925Wwxq5AuX3.GFWpQH.lpqxP/njzx','user','ak_9a7cee3673e7b76e','2023-12-19 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$Xlq.5XAlUgrGZQ/4xp.MjbLmhWL0.gWYigxxSrmzH4vnTteh7PSYO','user','ak_dcd92c9817349261','2023-04-06 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$ZDhaQu0wbCrFqtD4qhcLXqZcq.mHkoysSgQIkJOuFx/LanmEiiAHb','user','ak_93126c4038b24f3e','2023-07-13 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$yDcBlXwtBzXWhasAKywXrucvCqeQ7icFLFpt5WK6G9gyCGIihe417','admin','ak_54235b2677e4f911','2023-11-26 10:19:00',NULL);

