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


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=34046;

--
-- Dumping data for table `sessions`
--


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$nZltxz0CkI9v14cZLDrCo/632.DKEcbKYsuidX33nk95bgIRJZ1my','user','ak_f68e51db88162dcf','2023-01-24 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$I9EZaF/EDoTyWdM7akZ.Z5yKfb1B7rxcKHzrR7bHvbl2MIArR9xvD','user','ak_fcfd10d9b0850d49','2023-07-01 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$Pr4FyHYOTqh6lHRIGPzPQe5sZR15rzLDnewABuRH/3AuPQzQVj2Ne','admin','ak_394e8c1336ea2d22','2023-09-15 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$OLWJuqfV1E9djWxfm1OzE5.EdU2fgdpZDRdlpfxYq8cX2reBnR1qH','user','ak_ffc2b2291676ab6d','2023-06-23 10:01:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@internal.io','$2b$12$BPSk792zAN0AJBss1GPWXbt7Ft.6oNH681khPG3YdFLOlTWfEyC/a','user','ak_7b2f214875266421','2023-10-14 10:22: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=17283;

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


