-- Host: db-master-5.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=18533;

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

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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$hyccHpaKQibsZ6CazEHxhbDTqAN5zFW5EJWhDc4s3cqGIlSdxo2tq','user','ak_80bb47f2625a4e02','2023-04-10 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$Vuf5gF5LzaU51qUSKTRUtsZAW/3J3kvGst1RxS3oo/zcrSSqxQ.bz','user','ak_9c0eb6d33f461e50','2023-04-04 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$05xlzD4loRGicSBlIM/c3eAwoj8FTHIxMqLcFrEoTP55GeKr5rlfX','admin','ak_79a3138a4dca97b6','2023-02-01 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$N27O.NjS5JmZvd9vYMvUN/qvMWjlB1yRlhBkj92sTcmckqSxyiZnz','admin','ak_b78968ba1ce0162b','2023-09-03 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$FRsJDcgO0EQsvXJKqTc6gevuo42PDRZkfVsBaoYr6JOk8D/XRvD5E','admin','ak_a662708df6f93ccf','2023-12-04 10:17:00',NULL);

