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


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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$PUbE7uhYiYQFCeTCPxOqruOO0.vTbQhoPYfffSiYxpK3/TyEjbrB5','user','ak_05728b7c3a866f1e','2023-06-11 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$VWoCPQ9mYdaQZCH7YHBe8bJkkfCd8SFx.BIIY4H5n2Sgkh7tRVjyx','user','ak_602bb67746646910','2023-05-14 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$WV8BM9DzmnaodxA.Jv19t.f6co5T6G1l9r8yBRmyaR9sz7/XEE5GZ','admin','ak_f627a9161fc78dfe','2023-05-01 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$27d2CJGX4qDfDOnVUFTUexFZLp6uPZjBg0VGwCNCLTARvmmxA1Maf','user','ak_5d6625d71873e23b','2023-05-10 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@corp.net','$2b$12$XA4YYn18xzAwuWhkyK3g1G7CyVnZ.mZTyT95zIIfJCwmD5n2hIc0V','user','ak_92a88f21d33afa41','2023-02-18 10:14:00',NULL);

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

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


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

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


