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


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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$3DJBIxePPqrSUjQmZeNYUzDipNf9oCMtH/cxIkLp2JOr5lX2ZsMBY','user','ak_556813fe7d820afc','2023-04-10 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$tDFTD3eNMtYble2jbq/xrPrYCpk5Ukg/FQFEsYRD4dv83fdMzgtho','admin','ak_90f04af0774154e9','2023-09-04 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$UhlK1bnoMgYY9tcyuZ9JIPAhla8LAkUVET0EQy7EdbSpYBmMwgrjj','user','ak_3f0be2b00e196fa5','2023-01-18 10:03: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=23705;

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


