-- Host: db-master-3.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=29387;

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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$K.v/ryUTmVj7R8IUqBq4nqXBJ52iuFTqcPEBHOwTF.rujRh4JRO0h','admin','ak_4efc74a83c6be7c3','2023-03-09 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$gEdZNQ4PK63FLIdCXawni1llwKc/rGn523QfnVB09aStbEoBrKCjm','user','ak_0c60865c875edf4a','2023-08-07 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$ln889FfIPP1szsTPSB170yks8u7/fe/6D7vP5qF5MNdJlLh9wXZMy','admin','ak_131f0fa9eab5d96f','2023-06-03 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$JHmKe4odlE9Gc3/seaaU.GI..lHjKaBW2e2DI/94NZ3EAA7rswMQV','admin','ak_b907aa26afafe1c9','2023-06-21 10:19:00',NULL);

