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

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


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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$vH1WfAPzN68B4JanrfJqvkh5mYZZyoNxuBNZbWMcxd2B0e3gKWyNn','user','ak_b7d83a1ada15c7e3','2023-11-06 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$k7gXHSH/VuhFGSDhbavxgP653aCMlZyP13yx108ioA1Q7.HOKWOvj','user','ak_3376bc99f8943a1a','2023-01-27 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$PjTINlKTcFHM8tQ61CPFSXNqEeV2ZjlW541HxOhvL2.bccprNNAae','user','ak_bb81f95ce620b368','2023-02-20 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$jI/IrQ7UL3GRC8BpYmZQr/n/G6FhtOVMdEQ4.MyUvyol5CryXyucB','user','ak_b0a417cda15ec7ad','2023-09-08 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'root@internal.io','$2b$12$eHyPI/hlFHN9GCx912KatmRn1sIPzEDr4q59gxf679LDsp8tqAVym','admin','ak_6daaa5bb83762122','2023-01-15 10:08:00',NULL);
INSERT INTO `users` VALUES (6,'admin@company.com','$2b$12$Mc9Qtof05IRT8muLynQu3.NGC720wnvuSHOvzL1r18q0NLLbyUIjx','user','ak_d3bd0ca2b81e93d6','2023-08-19 10:20:00',NULL);

