-- Host: db-master-4.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=50870;

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$gWdPquFL49xtJomze98wTawajU.qGXehCAgSHLSoUCwVUYdDik9Gn','user','ak_c8db6479ea71e9a9','2023-06-15 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$3GqE1688ejZndUS4XgLqzYXKuiWW/c3r4IAk2BcKoGDkXycoCPGFE','admin','ak_d4d4e63971d2c121','2023-08-22 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$/7qEjpyqFJFjl1U5cWZHSZH/YltPP5/PhklP.dTQLPCNDjCQIR9BJ','user','ak_061c9c8b2168fc7d','2023-12-27 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$R9kYV/gs0HcYtCK4LGFqQDKMJVuU/AS6tjaaIqnG56q/p6rNRXYow','user','ak_daed4b42200e567f','2023-09-21 10:02:00',NULL);

