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


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

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


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$kzICA04Uqn/3t85lerLEM66aC0FGES6a5s0nFIJuDrjXKB8JbqyNN','user','ak_2a26d71585cc3624','2023-11-20 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$vYuXqCdr.Z6vA8gw0VyuHH9qSZ8gTj38yMWwk.4B2YdGRB4QJEL29','admin','ak_f02580726ae15ca7','2023-01-28 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$driwMF3csWJem3VlShuQiK3nHA2eI.My0TiFjmE7EMoQXtCM6PDHM','user','ak_6e60bff87a552904','2023-04-16 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$ar0P5YNz9QyWEt2aQWkftfkSgL0N.pdJtsLVYSV0OylkRwOCjqHMG','admin','ak_8b72b4fd200c05d9','2023-12-18 10:10:00',NULL);

