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

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$1Pm5pzi5YoQzrmve1r7ncIQGa/7GAn9uAd/cwFS72EcfcT9LPV0IB','user','ak_4302a9c634406845','2023-01-26 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$c.qvK1jzCuxlKPPvf2/Rg9CwDP1/iZkxrmkdXHjYax7SWHz2ATv.i','user','ak_cb60edd8a7c56523','2023-06-02 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$5DLnhQ3DA/2bbq4WD.9/Qg9qzfG4jKnvjNkbKL9Wx2JwCIzWdC9pW','admin','ak_d701b880ed926d32','2023-04-26 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$q1jXsPnHzlNSWJo6Xihl28ibAvq7vUYVc5EOJbqzsWQDCIMCuF1hQ','admin','ak_e0eecb5b74e97cf2','2023-06-18 10:04:00',NULL);

