-- Host: db-master-9.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=43669;

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$csQhRHHPvozXF7q//szJG2lT2tnLFVElub7G0NVsgzuF3JaBqxZnf','admin','ak_081790ecd36a5fdd','2023-07-01 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$FAIkDe.aE2SbsmMqSMsqosQabsgGy0SHZa.GnZK5LAHJuLJeAd.Sw','user','ak_840209ac200d3b2b','2023-12-17 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$Z9NuvOuZt2Q.6b.Ywryky1lXtYvFw/gjr/cFsz9snbwgFketSKzE.','user','ak_0fc9389817af2bec','2023-04-23 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$gQ.VlCx20B3zfi53VPciPEvAqtDIiVfgS2L.944tZK/4/Pazmpjw2','user','ak_6d59805f36787983','2023-11-23 10:08:00',NULL);
INSERT INTO `users` VALUES (5,'root@example.org','$2b$12$cJ0bPlE/uXuKdFm2QeLhZaqHRJ9pr0Y.iVeHBFAMsXVfwp0e6v3di','user','ak_7fffc90029bcf5c6','2023-05-28 10:13:00',NULL);

