-- Host: db-master-6.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=27600;

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


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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$6aT5J//9q9QbbY/DVbe6sUGuf75PzaVQqghYVjtEFnrp2c9bNNPRZ','user','ak_977320cdacb00e3a','2023-03-25 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$B.KTHr03X12XugUZtGjctkDi9uC1omzGV/7VXDR1WdsXcLMC2fida','admin','ak_f3547cfdf849df3f','2023-08-17 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$hwvVdjhYM1rt88ZvhZ7vQbdc2ErKT2H.2Icbu3rB2p72YQfFQWQf6','user','ak_5d1e8ee6471a3955','2023-11-28 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$Nxi9nVl0RSNAPmxu6eG0TFLQZjijberJRBdGybVPd9ae3Ry.DfbJL','user','ak_dcd51e9f05063b00','2023-08-15 10:10:00',NULL);

