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

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$nnb7FG6DBcqu1Zo4f1Hm1lVk.B6i5LqWtMYM1aiPP/ubVNZ.zy1KR','user','ak_4ee925d200cfb926','2023-10-28 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$SHKSDHxhgoUB6XnLdah0j29t.K6Q17Y.NwSo5kFCchySnB7jkh550','user','ak_a9a4991499176619','2023-02-09 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$vocCVp47EmhEAgQsvnrQTxvHXkCJ/qvhjq3JCCaZPt3bxRLB6Hx2f','admin','ak_3fe67d9c04ff1514','2023-06-20 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$dXsEzIRVvUYuJ7stauBQsTyWqMjssmXmWA/tBkOkxWGl3H/Vhft.a','user','ak_3f2e249cc2232eb5','2023-04-26 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'root@corp.net','$2b$12$dJIInQ6AVTHv2soC1k21OVDD4vzRuMLAvSBgVqy2xWAaJt7Cv/0QB','admin','ak_a9ddb1ad8bd0c4c3','2023-10-08 10:00:00',NULL);

