-- Host: db-master-2.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=40837;

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$j0bjkjPIVz9K1vTBJ9GbQD3Ex8bAJP3DOAnrJ8voDk2m7/SUnKDHt','user','ak_1f7ec985088b35e6','2023-10-27 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$HphL8BfZfzjVtv0Gbpyk4VV7XOqoWghyZU9ekS9HDWJUpJar8T9Lf','user','ak_cf0b72abf1aa408f','2023-12-28 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$MCwE1qAE2WQL7lDySRvtyekSrPR3no0/DFxQsw/RlYypxKmJ.PJNR','user','ak_aae3c96a83dd186e','2023-05-24 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$/m8FHLAdjqs5oJBIe9VvnzbbavF1iRkzQQjhmxfjQOU8zeEUcSagA','admin','ak_aa7ba9d38ed4ea2a','2023-04-02 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@company.com','$2b$12$za1pqEElnpdiqlyp.L7.hwKd1Z/j2FJh804Oled13ac0oyO6evDDF','user','ak_d477190399f6d386','2023-03-08 10:00:00',NULL);

