-- Host: db-master-0.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=32482;

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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$eZ7FArdByfyJL5OUFXlJf9YSbpRr0i5FA.MtzZ2shaYMTJ/wbuZrA','user','ak_c87c26cb56e151ea','2023-11-09 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$a3/XIgwb2AKB3dzxVvWBDLh6b2La8MD1s1VYFuqEV0MJgzb0B2V9t','admin','ak_1ee4bbeac5d0259e','2023-11-05 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$ybtSswS3tD.ozBZMdy0lF6shutMxGJhV2kdSbpCzautA6HQW4UBAq','user','ak_fa3fef1672626203','2023-08-22 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$SHS60KIeYMVZyfVPM054NYcQEICmOA2G4PRwuLNV.LT2.zlZ3BKjW','user','ak_aca17c24c8d2b187','2023-08-06 10:07:00',NULL);

