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

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


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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$WAu6uuxhXGT7V3/V9mvt4PhYeUTiNPuhY3sOihQj7UIWZ7W.xNfKy','admin','ak_10f928042da702c3','2023-01-05 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$iSURZDJiROMwS8sDvIKGjW3ZRf7Mz9y0sFPV/yX3Z/k/93CZI0u6g','user','ak_55ac02de41469fe8','2023-10-10 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$K0uXasrUjnTZoxDMi1qMX67meWzYfZnm1PrpyDA9b1siS2D5XNMma','admin','ak_ad6afec18c36bb4b','2023-04-13 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$lp2mHPxPe4gztR4F8nzY2f5GCsWdVvwbDC7E8IQeoQRRy/yVz3hO/','admin','ak_a690dd080351a14a','2023-08-08 10:22:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@example.org','$2b$12$HN0Lkl5S49tv0h5.KzTG/6NMfqLJyKZ/RdfDHm8VVW.itfb8N4JGZ','user','ak_11bf254b26942611','2023-07-27 10:23:00',NULL);

