-- Host: db-master-2.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=9502;

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$crtqNdzH9l2rdswR663CnVCx0RYiuOruSTZIroZq6JaNMs7LOxhuQ','admin','ak_12695ab700b2004e','2023-06-22 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$yUTgOG.PvGZnFhz5d7DQCZfVsu5G4eEaOt/NLIQwQh9J5exnV.zl/','user','ak_5d792a4a9e41a196','2023-08-10 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$ZM1.Vm6heiOcvrKA5p8gN6lChIfNZmaczuVccemZlif1j.qBDA8Kz','user','ak_822d96ecf5b40838','2023-01-21 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$J.BhTMGIcEIbK3eaa71FXzY1ZXU4XLuGg8zQNqBs1UgErJeiseJ0h','user','ak_df8d100e95d155fa','2023-09-20 10:01: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=5980;

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

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


