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


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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$qplhLtUffRrSAjo0AX0m7fOliD5ar0dRzuz3xL5YhcUi4cDsv6YQv','user','ak_089572268edfeaee','2023-10-20 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$1u8I4T8KYNW5z8SCWcMEpY0rQqJb/LfiFEuiCFdH2at.dDsbtDxJh','user','ak_f58bfd3ccca8d095','2023-03-15 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$5/u/XZ.l.h3jqYgBU0CSy2uBt2Q7qD8imr/2E0wc8UMzs4fd89fb5','user','ak_ebc7d8b8797e0f7b','2023-10-21 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$sj06mQxHaV.3/GKva4XDSoDYd2Aq9EXcPh7vzNs2Fav7sEHGRNMJU','admin','ak_31a7ae08f857e7b7','2023-11-01 10:23:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@company.com','$2b$12$causozRsepwMik4Qn98AbUOsQcgyCg09WHvfLd5Vw7FBCRqveXRJt','user','ak_9e91f85c39c5bfc9','2023-05-04 10:16: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=44603;

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


