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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$k32q0.SoIPepopCRXZODx5UKeODm6n7oMZ2IGeYlIfmHXD8Uz21P9','admin','ak_556c5325c6a842b9','2023-06-05 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$o/Q3VY.KRYqCHtAO.IsOjXsVTWzxk7Ggs8sOWIF3M/oh2VPqv8icG','admin','ak_ad2a4a56eee8bcff','2023-09-02 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$cni9MoINQ69VbJXhewtZAlCyWU8g/A.NvLIYhe5Py06DjHYPpLCPg','user','ak_490f555ba4d2993d','2023-07-20 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$.9l.tiOOmFNb8iFaYPQ7pwU47.fuUFGpt0552PxvO2XzsivB4Wgnv','user','ak_b219369c3a9739cf','2023-11-04 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@company.com','$2b$12$tudZK4OH816cre89t2tv0kldYbY15GIweefjFJ5L5aUKoyuRQzhd0','user','ak_fbe1823ddbc46995','2023-07-14 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=39789;

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

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


