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


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$Xcnjx7b/l9fjuvZwxQHFtPMiXFrY/3/MiFimEak2fWYWIxoTO/oxw','user','ak_4040c291abcef0bc','2023-06-12 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$rw7I3ou/UBi9e2E0V0vr4t6lpd.c62nvqeQG5ZMFUpAIax74y0VDf','user','ak_edf0036c0e5c4f9c','2023-07-27 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$el6H0OGdph/.RFcG7cCRuJKWmrfppMN9GKD9odyyJFBkVQo.Rdsa5','user','ak_246e0522d943759f','2023-03-10 10:11:00',NULL);

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

--
-- Dumping data for table `orders`
--


