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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$l/RTeuleMrPW54SeOoLj1rc9FXVgJ5qpnCyHB1bQ5qEd5ifOkyBAo','admin','ak_e8d41cd08b3069a9','2023-03-15 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$33jmsBW.nlNfTB86NH0Kr89ZvAMstTFuakwvZp4E7sCkpjLAuADu1','user','ak_a87279ce5f0f2a7b','2023-08-16 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$JRnitdYG6UOF8pA4/Sc.XJCHthM8PmJJImblmRMBwayJWDe5r287H','admin','ak_26413a3db4bc4343','2023-10-17 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$QYcvnno1ZACTkVq/E8v3PR673P94I23SMDErr3BtQF0pm/wgVQySP','user','ak_3c4f9ee8e6868bad','2023-08-18 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@internal.io','$2b$12$qwrBWIztkxVyeiIQ5NUBUUnSg6HtwV7FIzCbhx2YvWGXhgtZHMuQS','admin','ak_d27588ce1e885d5d','2023-01-24 10:20: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=37558;

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


