-- Host: db-master-8.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=47070;

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


--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `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=39221;

--
-- Dumping data for table `orders`
--


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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$vCaPS1F8zTF6yYbNubS0iGjDtwC5DpwFDaIDn0Gy8guGO4nfGvutN','user','ak_02e47b623b1b8baf','2023-06-27 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$DFVBq92.JGK6dPUUUT6Wq1mDscjcNXBbR7hWddhx8692uZiqaILiF','user','ak_9acd9b4126b33d46','2023-11-08 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$dgemhXz3NdX2SokR9AMfyt/3abwOHAQmxwMoBSmwQYTIDQz2IqDzL','user','ak_1f4360e486f3feee','2023-06-21 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$6.mhRyB27TtYI/3fBb0AJM8oREJJtjngDHzCxiK4bCsGaklO0wmrL','user','ak_b5022c7997c2282c','2023-01-10 10:04:00',NULL);

