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

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


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

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$4k8Q6idW/o/LE2H6jYqAVmim6kVrIO3bJYn95Wmum1ClzM538edGi','user','ak_7a9e618131e510bf','2023-03-15 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$uisea5yC792mZTWup.FOaMhVXSiiWTHW8SwtgfQd90CfcvjDwKHt0','admin','ak_f432d840e4104858','2023-04-04 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$B70pi0KpY65e9xn4pwUv1.i7z9oGh6mHUJoV41lX/j/.KKvvs9Dkq','user','ak_cd3e107cdbc1b179','2023-10-09 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$1VNIAlanyef6nGQced60p3dJKQSZFGOGGNzfHri37ZxApmHq41oTv','user','ak_28fc48cc6eb07688','2023-09-13 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$veXSPFZ6hz.RzLKtBF73TM0w.VGUDsFROIi591WLXhrcSkJu4.hG/','admin','ak_041833d964b0b1bd','2023-12-19 10:11:00',NULL);

