-- Host: db-master-8.internal    Database: webapp_db


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

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


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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$j3KjH2SDGbgcteSo05OTEHWDv/wb9oywrlwNqKfF9ob3zNnUbzMwg','admin','ak_b0df02bbf0269e64','2023-02-27 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$nkh9V9.UH40a8l17HUHepx8.elk5oJoTb7qn95MBjYk0vtxvqGTF7','admin','ak_909bec5ff981a05a','2023-12-18 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$OCajhM8dx7quWth3Gz.vGYqmMw.HbtgNGeD1dmQ.yQXwOWSdI2uOp','admin','ak_f70ba17a22898676','2023-08-28 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$voms50YpJ9ZER9TDC/6D28gZwXUxk7Or1exi6OnpaIf1.0dqemv3c','user','ak_075ffc442c8b3856','2023-01-11 10:13:00',NULL);

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

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


