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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$Y0HHRIpnTuZ8KGL1Ck5Z51tqQzzMXhpkJUnXsc92OJweAfmaauRtn','user','ak_4b1cb9f3dbea85de','2023-01-25 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$2N3lKwZhBTYSJgO7ZXN4wZSILbLFO/k/sMzAJsRJY3OXtE1SoJpXV','user','ak_6123f97a9b42bbb9','2023-05-28 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$iVJZi0sgpwCWomTd08B7ri9WxhoeiYcE8pDuYwHE/W4Om.MFlbkCv','user','ak_074a834c6b3c3278','2023-12-21 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$sqen3FqVEuE4z4WkiOJkZ05Zgs4IctDmdnUHiuXG2F/8/orOJDcvO','user','ak_049161a690077afb','2023-04-07 10:05: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=42769;

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


