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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$Per/9ImaaSgS8Q9XMhG2gNUNlA5YXRjDFjpRx8L2hhyU84BluYMeP','admin','ak_9ae9a7e7b7760045','2023-08-09 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$lIqUyZmw/irHcP3sd.WVA/DkQxpPNktE3m2vVjrseg0yHTFLiajPM','admin','ak_3a2433df1675f6bf','2023-03-16 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$ObQSwebXyqfU8INHTTOTXzCXXnpYkzPZ8hqknR3Cdjzx8hHZX2/0W','admin','ak_dc88482a4707da0c','2023-03-18 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$9uNobnk5O8KaqHn1HkGfMi.wufgFSUej48g25X0z9nHTl8QPsyj92','user','ak_47e2e3f066c7a120','2023-10-20 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@company.com','$2b$12$u.Cnket1F93FoVizhv6X9ERlZqD6zBWcuLjIYQDtJn6FE6I3FuJer','user','ak_a936bcf00f5b383d','2023-08-07 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=2076;

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


