-- Host: db-master-4.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=28109;

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


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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$KjMBkgAA/FGtMeO72xjr5HHEz4uZUPnFEfFBwaHMZVT6pUsFj4gpO','admin','ak_1944efc8ce2f1cf1','2023-09-02 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$gQT2qXfbE4Wz7xMzwUrS3LiA0E2gwt8nCM4fxI6bh9FABjHK4njj6','admin','ak_933b3feb0a2721b6','2023-09-20 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$QsY5Fm6OlOU.i1tJC1kA5aOOELNoJzu4vTNSkXUwfpU0ldZAGcZUV','admin','ak_e77f202d916271b8','2023-08-03 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$loP9BEv3x6zqYp.AgEzNhzc9IEEMEIpVnmrPix81x4CPcwmZI8wMg','user','ak_79592ed916d9ce13','2023-11-27 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'root@corp.net','$2b$12$7ZZwVlJnDOQF.lEzoFpC8sGsmxEPX9qzD5UTukXuGSVATrA5qlm.E','admin','ak_e9462fbb737d1f13','2023-07-26 10:17:00',NULL);

