-- Host: db-master-7.internal    Database: main_app


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

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

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$A4Fz4pGRD/99.8Vxpg3rtr8cI.RnXYZLOZwrwxjor82RRYSYV/Ox3','user','ak_7e7cd58367f541fd','2023-07-01 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$UY.ctIX8Wj7r3VU3VNeM55/inImFa1B5EEy7XZVmf9MWMIrwd/FUa','user','ak_fb74d94913955c91','2023-01-20 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$aGFlDzEDMMiNVPK1VCQK/nMOLhwdHOP0XTLRygXWuMEAEdrKOp518','admin','ak_3cd63a614d32e141','2023-04-21 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$xweFGgFrOntuU.0MDuPQwws70gyG6HCBEIm9vRL7TQEJSpxOzZCQA','user','ak_34aca0109f9c8380','2023-08-07 10:15:00',NULL);

