-- Host: db-master-1.internal    Database: main_app


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

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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$DKqXEvMTmlU1qlUkIQTctF/BksgivCRFCsFa7xcuK.ONeuQX.Jvfh','user','ak_f4037ab028f69632','2023-07-28 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$yi80h7mLXQ2BFyVBmzEt4W3Ek13ucJlDDQAzuz1XnuUP7lB4.klgd','user','ak_2ce98313240f8454','2023-06-18 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$ky5cCnC1sTRHXeliy00oLJRRAusL7cN6v0SkfVLikXscoGhrg/1h3','admin','ak_972ed1817a0c9fc3','2023-08-10 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$F4V9OIHfYaxjaMId/m9yYoAbe.TrY.hxzITrpnZVdkDVTB2vhkXKN','user','ak_65cafee5c896412c','2023-08-17 10:23: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=48889;

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


