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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$lg29.qj6rUEf7fEADrfgoCj8BzRu.3PzH3HMOPI6KwPoo4A5.Kmva','admin','ak_eef88d2631b39218','2023-09-22 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$FdZQEbaMFNobLQEBov1R8N7p.qMxxSpKdnDny8hO4wdziBxjoFBxE','user','ak_e57610a6555af38f','2023-04-17 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$Z26TH6VbczZ0gxaNYwITmP3Pt/kBCEDb.hFbIlw7bjCFVJvjBtH5c','user','ak_e3bcab52e0b4430b','2023-07-11 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$llZIgt./ACui4ZIAB6FR9UqmOjvMhr.8ZD7JZOtC5aL4/w71SQoaC','user','ak_42f95a290f0b315b','2023-06-12 10:21:00',NULL);

--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `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=41653;

--
-- Dumping data for table `audit_log`
--


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

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


