-- Host: db-master-2.internal    Database: ecommerce


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

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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$saRF9iL02a0e3ClX8d2Q4iE8SuEl9KwtkVfOVdppVGvfTqPNRwJqE','user','ak_34e12d1c2773da34','2023-11-18 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$TbrlZg6sOU8NnxqYRYwQh7oz2WcnPuHH1zAgDMoafx2Wap1OlmfTT','admin','ak_ffb45563071b1dca','2023-08-01 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$/az/6oZzSRA8UVGoHjntEXgc5Ptc6qZEQKYwZV9V5GP/KiSOFNfKU','user','ak_53fef32b87884218','2023-04-16 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$4JTVWxzx.6SeVRxHboE/dGaNwHQXsi98TI84XGHTYwPK0eTC.6Dsi','user','ak_98defc30a9030ae4','2023-03-08 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'root@internal.io','$2b$12$L0XnTg/ftRA4d3A7YHEBrfiuWX4r9lbdljRKnRtL6u4Che8KL8HNQ','user','ak_200e762ca3deaa46','2023-06-12 10:05:00',NULL);

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

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


