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

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


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `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=12209;

--
-- Dumping data for table `products`
--


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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$IVQGncZ/3FQvFVxd1xdb0kS9VvqNzDoS8ujWxkQ4BJYQvpGfcjFPY','admin','ak_32131469b9620bca','2023-01-07 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$r0NXzkVQ0fEORWfzPR5qv2c/dBbLIyFGGtMbNexIlhbez9Y/SZyA.','user','ak_8a9facc464e92bf5','2023-08-24 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$Cq5Eys9ECEH3B7Th3K1VCVuE9aSXlVfPSCSgKptKroxDQkreQN6Si','user','ak_443a9e2230bfe9ae','2023-07-01 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$SwINx6cIAgq./6QEBiVTZa.gT2UWGCU3UUzxrGXr7cRTLYd9zVy41','admin','ak_a8fb4c3f60083587','2023-11-05 10:18:00',NULL);

