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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$A4sHX53VVEsbfgj71l3g1G0tGeGRR1ZZx3zHfZpWi2hl67c8nCa/p','user','ak_74e3292db49c91a6','2023-05-15 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$MGu.Dw6KWb2EHdHnmSDOBhqnk82ezNQZ/Nvi0uJBR92olKYXlifbH','user','ak_f3e403b70865dbfa','2023-04-21 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$dHEYCbVrbjBQfnWXiTVDKmUD6l6VMoWR0OV4fKl5LRLl68t2PctUb','admin','ak_fa696bfd07541a7d','2023-01-28 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$O1UM.dSpsEpwNdrh2tCdZgXjzaCZesU9KJjvxdoewwZZ1MQgQe5gl','user','ak_79d4dc247f7391f0','2023-10-14 10:05: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=42597;

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


