-- Host: db-master-8.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=44446;

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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$wlfIqO045h6Hf0XS8LF30adJwcX0kW2WZmws72GhpFeNOXKmkdONo','admin','ak_2487a09b2028e8d8','2023-04-01 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$qKZotRwcw7LVqSUvzzRfRGjbZQUZSIlNIqU9xa27r1IDwnPSOBatf','admin','ak_43bcc08b1c35d411','2023-08-17 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$qa9t15x/Za/JvOcICUhNEyYc7wmwarnqnFd8m3aAG1xV.bbQqwdY0','user','ak_f7cea3d1b6bc158e','2023-06-08 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$8mgXbsrxjXeqT8xAJ.Ar1mhD2m0UNCJcUPwQ1/3yn0GHLcVMdxcQY','admin','ak_6b615176d415e7c7','2023-07-05 10:14: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=15895;

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


