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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$yjJREPVqHIWY7AHRa5P1dKfasRUy8FfCZoScxbKsHAFiOutKlCtNV','user','ak_cb64872721bb1446','2023-03-28 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$d73Ni2Uvu55.AKspw1Sl2v6m6.nRm2qMH0SL7VIUySsKAn9KIIOrE','user','ak_8b651b32d861f92b','2023-08-08 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$ClgEKdfO/ZntnkKbiXz/oKvMXoSxEtZv28dWtyxvLVBu/im..zh3v','admin','ak_f5596c94092eede2','2023-11-17 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$/OuX/kME2tGYm5RqTk6Mb2z01YI4eHPSvZLYC0eKe4Ogg.A8vy/Uw','user','ak_df5590805a10d3ed','2023-01-18 10:20:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@company.com','$2b$12$T9idcpaI2k11fq54ozLczGb8Q2owP7gz5e1cXY15Rp3ZyVXKGhosV','user','ak_4ff6fe49dce4fb10','2023-07-08 10:11:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@company.com','$2b$12$3Ra4tFX8tKhhAzO28zxr4vcEaG2Rn8e3pcT3SbL8brnB52hqShWzO','admin','ak_c5ef641a0e455ce2','2023-12-11 10:07: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=8732;

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


