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

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

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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$O3iDRe1zL/ZJcTP8jq1RpXl9lBxr/5phgJTPmNy6YYu.AVC8mMF7u','user','ak_6afb7d5dc4652391','2023-03-18 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$0RV5d.2gtGS5idA/QCn8ksFhFw7KiAiWrY/45ZzHDLgIwBiKdsxz8','user','ak_4d8dec636743afa8','2023-03-01 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$9df0RbOE7sLY9laJT3JJhsDuM/QnOyEM1fHmoNGo6.PYDRIbCfc47','user','ak_5e1e61e51560858a','2023-01-15 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$jnw.jCqvtiW/eVzt/dWIIp.4MBKW.ByG05r1KwUZbMywprInqeljQ','user','ak_89c2c4961fc02ce6','2023-07-01 10:04:00',NULL);

