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


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

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$lxINyWzpAbH5TJmNafTAypBtwl9IsQnCdsvtVve0tNxzsYykPkzAf','admin','ak_8611ad58df5fff8a','2023-06-10 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$Fa52H61Ps5/JLzopsrm0ogAvIy.CL9hZxie6B3PSccpEI7DhlcP5j','admin','ak_803589eb9bc0fa6a','2023-01-16 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$MXYjC.64yr2RO.2fJgldqEM3WV9H4APfQ6ao2kthZM7hVQt5vPvjT','admin','ak_6eec334a0fe33b00','2023-09-03 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$ZdmkL9jNSiJOqUOTrfuDHJuduLMgDyH7hI/kT7yPeTOGaDUDmOGMo','user','ak_a390417d4c26265b','2023-03-23 10:23:00',NULL);

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

--
-- Dumping data for table `products`
--


