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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$.UNEwjPivMmi/CIBnvFFojdMjTeE/QSJ0Gshx1rmpPyY6C89eaaQU','admin','ak_f0f29264c999b3ce','2023-07-13 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$TzlG2GHNCWRLztRafoXRe5NexNQY0YQ.bLr6IvRPDRP69fgCJ0fY3','user','ak_f5b20eff7c6142b4','2023-05-03 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$o9UTErEoP1JkOfE4lgpEML4.U65Z0r4vs18bDR75puaDfwEpz1PiH','admin','ak_cbf8a2679ee40587','2023-12-15 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$EBgTGFXFzgWUuND64ZC.JT2y/NLCDDLhBTjjrJqqqKPfSrtPtCgq.','admin','ak_befa049daaf63c49','2023-06-22 10:17: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=21119;

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


