-- Host: db-master-2.internal    Database: customers


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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$7RF1RvpiNmS4lpzOgXU5x1aH61an/4ZEKvLi2ekuYpAJUaW7vncIc','user','ak_0ae02197ad2ce422','2023-09-18 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$ysAiKJ5uF3GG1B2ow5ZzZIiXneLVUPhKhi4PKLmf8nRQ/9dFIs1Rm','user','ak_1cc230fb0dca2779','2023-03-11 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$BK7c9jEl7Zbd3zsxfiZD8yetdDhnweB7qpd3ky.FRN0qEVQJcAjCi','user','ak_ea3a6f6cdc6805b3','2023-07-05 10:15: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=19289;

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


