-- Host: db-master-7.internal    Database: ecommerce


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$I/4UVDchZV3BEf9K8vJZv8wvnhY165uPGOtRicfakCsAbHwlDQLpI','user','ak_f605c0b581228d25','2023-09-25 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$cVPx/ZWPLvrQepc8eefPx.0UBJoJShzL0gXVYOJSedImphtFVSHpr','user','ak_17776f798c5a7cd5','2023-09-12 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$QeJFdAm7lBAfRWkor8ljywowX7HWWrI95WXHyWRRb/cz06/MnqUm3','user','ak_266fa3256772f9ed','2023-03-11 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$xBmoB.CcRhh0oUu3ArnwGAfj/gn.ob7WkiiztlXr3TD2IhE2GMNKW','admin','ak_f4a33fe261a34763','2023-05-26 10:13:00',NULL);

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

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


