-- Host: db-master-0.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=43806;

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$jWXnqimlN8QAQSS47HcyKxv6ZSsp.hgLNxYB9ZMVc/TJSaPa1Z5Yo','admin','ak_9e2b77ebf115a4a2','2023-09-28 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$Fc5y53WUqobMxzOaJHWnY4Wf5T8tJUqyeHa30ZEkdtM2O2SPq7u.l','admin','ak_94e01daccab95aa5','2023-04-04 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$V4g6t9TDT2NvPx8g79ayAZq7yk4mACyyR79e/E25J08ysQHvkYfPL','user','ak_7436a8010d534e36','2023-08-20 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$9KWlXC/RyeIDz5v/u9DxPsvaXFpN7.5vGyxuCuhggVdl9ZxFqZ.tx','admin','ak_172a71f1e1073320','2023-12-03 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@company.com','$2b$12$SIUI0SCg4Y4Y9F7lo3Rf/hurMZ10DjqoB3y/lRBg3Dv42ivv4r.03','admin','ak_67fbe4fb2f776bf7','2023-04-20 10:11: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=26482;

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


