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


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

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


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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$cwVM4XeTeoMddn7cw75v3qqMKbFT07xNQ.SEq/M4Yugpylok.hHFu','user','ak_aaad2a02afcff281','2023-12-17 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$d2IQgKfNtQ78HNDv8L8WnZa4tyvkIoZlrcD9Ygvz1AX5KhDfL0jaI','user','ak_cc0e7381708726cf','2023-03-24 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$u8i.QxeHbeAO/8nWakOZ6JdvwWd22aexed6Y9bvwndHq7QMUoLnBj','user','ak_d1b9a0436f5c892f','2023-07-20 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$E/WCHuhtulpFMc1pjgQs121.z5HAAPEhEw3vQA8LOM6iYQczbr4EY','user','ak_409e823578f219a1','2023-08-23 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'root@company.com','$2b$12$llCcYgRoVWK/IsWaCVFS2dECziuZEW9osWVpjzvIRtqf79WL/cY2K','admin','ak_b88ce48bf8b9eeb2','2023-08-13 10:15:00',NULL);

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

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


