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

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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$OPN32OXh6HBgFP5xjFzQaBsvwQIOiUcD9yR14UUEYy7JNchLlP1qt','user','ak_f14c1035cfbd3f45','2023-10-24 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$28eKOcdQ3PWlQMWGE9l0gQmgWiBxl2AWSXtYIGvfnupTcD3nJ3j4X','admin','ak_13202a0b937e53ac','2023-12-04 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$2GENFZFmT1dBfOL1BUCZJCRNm2UnTVmp.vM8NvSWf62K8gdryZ5IX','user','ak_4814859711d5a7d6','2023-02-23 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$EF1oMmeey0om9uK6ynHmg0/nPhdO0rhhkTwdLihyFqC7/Lc2Z4jfi','user','ak_c7dd515d8572c88e','2023-10-06 10:19: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=22818;

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


