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


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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$6UzHucpw2GJDQ8KquZAq3YTV09KDwQ9N.BaX1RfJDJR/RtQuFYotr','admin','ak_3a1c4dc12f0edba6','2023-11-01 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$kFR6dYfCaxzZ0ElzpXfkL96Na.BWhYxANdY0ym2rkbZb924IFrZ07','admin','ak_13eb08cdfe77fce8','2023-02-25 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$ZcyZyHRm.iO/NnNlJuAtzQtuaQ3UcR1JXgZ0M5RL.w9CEGz5KqDWc','admin','ak_262a4f54bff00189','2023-09-12 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$Fm3NsFklpqoXp9xBsa27/AMQzYZvSkpi11V9NokHAAD5dvmVSLpyP','user','ak_fc37a22b2edc9dc6','2023-01-15 10:12: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=30003;

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


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

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


