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

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

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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$iwqqvcvaFlaWO6R3wV98KR4L.T/zhHn6A5GTlJfPtvgCTT0wp1Ncv','user','ak_2bea7c7c06c23bf0','2023-09-06 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$63wUBf6BFnMVWSsmkzaUHvszRdUzmEaG8RJE.6AuUe0gklUyoX3XK','user','ak_7a650cd647b24b62','2023-07-23 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$H/wGqRNHDyVhKJ8Um514bWtjNl8jG/IuyO/plZGAzMJgMlLvVEJY5','admin','ak_09ea0ddadf4fc289','2023-10-18 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$Yvv0tsPeswecZEFpr7cY0CPYUg0Wi/4t2WM74TQZ6X.9FGeXDg5yW','admin','ak_bf08f0a59b79f396','2023-08-11 10:20:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@example.org','$2b$12$hd7gPSSOoeVVasu7aywb8ZsCbTBl6osIJhASSfKKCvU1sNTob3jvd','user','ak_07d67049eff9c824','2023-09-02 10:05:00',NULL);

