-- Host: db-master-1.internal    Database: ecommerce


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$1.NN.ry37i47iwI33GD9./391q7i8w10bK64Yefjn8dBgtE0BRL6H','admin','ak_98f59d3bb29ecc5a','2023-06-14 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$gyIp6d1dNx7cAv/EAQkhUjyzpbwHW2KvrYW.HxgzGJJb/GKPpYzsH','user','ak_834e6aa7096389ce','2023-03-06 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$d4iTZG1TNmhIEgLrtvtIhUPkmMU1RplYXWzkIbbA7a0O2FPMmq4Aj','user','ak_db17eaeab6ac6da8','2023-10-26 10:04:00',NULL);

