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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$67nA5NJ.W2irnc1vXpxQcSxijxRkN4WwdRs1Pafy6j6paPwT0y8gh','user','ak_859ea4c5aecdd75e','2023-03-21 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$Hfin9G3ooSpPH4JgrjRrSpH6rkcd40zw7i2jx6BRAKhk3Yy06d9Cx','user','ak_94d5f4ea35532974','2023-12-22 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$xq8cnCN7qT5ipbAiCErpquDuB6bqqlbbhRrmyd4xqrqwLyLkjMGv2','user','ak_f13f2c5abb9444f8','2023-04-12 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$oVieM8/8wbUWpPYL0C5ZyvYEwbV1.oanokqhKlPKhmyoi0EFI6IS6','user','ak_80ab6dec64d77cf8','2023-02-11 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@company.com','$2b$12$CvcvOodTgVASBbyFdYIz6nQ8b1h8S5jLXblLpW9zzsgTcJNGNlZOF','user','ak_5908274fb214fe26','2023-10-23 10:05: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=25875;

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

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


