-- Host: db-master-9.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=28831;

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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$9lDnJu8/TSfd0ciSOLdqghJZDzY03QzbSeVGevLEW6NGt./Yhj.J3','user','ak_27d8d2a507d6d35a','2023-12-22 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$x3auYJz2QoXSoogYJApCTtlM2J63sBbOobyMislpBnOPadJOb6Lkj','admin','ak_0ce84f4a711fa0aa','2023-11-26 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$xV0aJjQUtud1qyqbzeiHal8RMgC5six8cHTULP10QaI3gn5N1jq.H','user','ak_5939066a61b7226f','2023-10-23 10:09:00',NULL);

