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


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

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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$bfKQyC6ZOz.Rx9sfwA1RMGfFoqnS2RmTCYs5oUsfBVKpgfd3NX7A8','admin','ak_e212ccd4d0852dd3','2023-05-16 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$TvAWy8eek.4smJZ5mY.W4bc3MUg7MZCYfjgNu1spMW/Y2YVMvzjzp','admin','ak_73ab4505bd4ec41e','2023-07-15 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$9TcPCmCxv8jebk6myirBF2057MRAfiBdUrOSI/LQaxIb0WI80znpn','admin','ak_27438e295b29f420','2023-10-01 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$ZUR0OTOiwPr84s18rMAou5px/hO6cF0zrtT6rVaP4wVlNlQlja0HW','user','ak_dd1c1e1502eeba81','2023-09-12 10:19:00',NULL);

