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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$xZrExPlW2WBUEFo7NikBI4/WnBSvwzdgXiBsyhLES9FJD8jynLGso','user','ak_4886e27c8ec58f71','2023-07-13 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$6IaOGMPpAoR9jmQDHjv3YpZaxJq3cn9F5WD8WKYZwDX4PE6sWrlBu','admin','ak_dc981f54106f4a7b','2023-04-21 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$vsRC2YetYGQCm10bxZx89rb9xUGIxGhMddVE44Y1adF3c7feto4ag','user','ak_f59e5e87823c43fd','2023-06-11 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$J5QoSe9LrgaPvi.hBEhxi3blXTvbOTncGhHQIN9lssuQ9jnpRQdgt','user','ak_586ca96d65a97efe','2023-02-04 10:10:00',NULL);

