-- Host: db-master-6.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=31279;

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$gbKOAdUCr4QAhoy4333ZM4j5jc/3RXrxT1qfuH6XkjHosKPga2lqW','user','ak_7d198a5ac3cfb996','2023-01-22 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$JKWKrxuO/JK65tFAFcBurX1ljl8imEYIo78EEB.rxPQfhZ4ttBhci','user','ak_7c6c0d92b3798216','2023-05-09 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$xMJRPqcphKLXJFcFsD5ESsGo10xfZGVOXbZAGh6.DzX6qM8.CRS2A','user','ak_cc3028c2e1394a0c','2023-11-11 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$2qAPnxL08tI1epqsuqXt1H7Rva2sXdNW2VX2U/qi2HJLxuW.BWbRx','user','ak_f50e5571765388dd','2023-04-12 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@company.com','$2b$12$iOrfL8vKEGQoOXPQr8yxQoRQKSWRz9HK6nOZbtyTJbKfi5QI2F7nW','admin','ak_914796a0ecd15e2d','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=13830;

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

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


