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


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=6053;

--
-- Dumping data for table `products`
--


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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$3/c5q5tdZC/C14LcuIkH/jy0qrS/OQxrejuHYDRb0QrAvEhSNOi8u','admin','ak_bb5e8f91ee2705c9','2023-10-28 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$UEu0BGQjzpT4pBCaymM7DutGr.oUwcEEJdb5PUbBRKZV0oub9Qycn','user','ak_9c1c987829d9d7f9','2023-11-07 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$CA10UEv/Vfa7roSWc/P31v0oi4Yfqqlzea8zaUU3J6nV/2eL1NLEn','user','ak_fdcd2c7cea75927f','2023-02-11 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$Ju5ulY.2kGwSfFxK00LwXtQRDxoz.8FkzIgAv3fy5QbZrJA5NWONx','admin','ak_f1c844634e3ab2a3','2023-12-12 10:21:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@company.com','$2b$12$Q2ZK7J6EQN3YLy/Vi5TJCeSpjj2WlEWsI.iK4nahfIz9M/Imn/8ol','user','ak_8cb53918436b66ef','2023-10-25 10:02: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=47308;

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


