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

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$/tmz5.tnW7CiYnkNiYmAKOJaeYAWBPYPI7yMt0xpzbnXddhRUXK0Q','user','ak_d4e5d9fcda90fc00','2023-10-07 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$hhROi0PgvCptJ65vHOYTTNm/27Q6Esi6WCF9MSp9T0BJZTyszzjH/','user','ak_417918ba7548954f','2023-09-01 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$v0wo6AGEgeyuHOwASLW5GeazzZ03ZxWKLoph/e8Nkf.1GZREhD.Jj','user','ak_d58673092a4aa6a3','2023-05-25 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$Bc4Cvn7VHULCsUFo7GR4D956Y9MJpS9B0wQaEO2Rjz2GQRn5PqpBb','admin','ak_0c0bb647194d55ac','2023-11-16 10:17:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@example.org','$2b$12$JKaOLOK.WJLFy98sky9ZXFKcVgIqIqqRV.aSC.LqYw1nsVmXZgIk7','user','ak_dedab389869ed59f','2023-09-12 10:14:00',NULL);
INSERT INTO `users` VALUES (6,'admin@example.org','$2b$12$SpeySlE.Q6fyJh.o1moWc39EH4POGaB42Wq73gC798q8e/bLPQTFg','admin','ak_b55fa10bb4029a59','2023-02-18 10:19:00',NULL);

