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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$0OUw3838MPJFuRcjX3K2T.q4xz.nqer5MbH/GMOCD1bpmJiAxmb86','user','ak_7f4cda10fdd00130','2023-11-18 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$iv75i/stXD/2HRgsu/uiZInA4Eftp.xXgOH0wIcWwrkph1EitAa9p','user','ak_e5929def6cd83458','2023-03-19 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$pr6sLfstdxmGRbbO/j36UjgNPuGVrSYOyWT66zJXA.sQW76onbzMS','user','ak_11b9f1e18f9fcc4f','2023-06-17 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$zAD7kJqAxoOKAwfkEIVRuwqj5vZ4ONkaQ59hYQJB1Z8eGwSEE54Cg','admin','ak_4c2983a6321c6676','2023-06-13 10:06: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=11129;

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


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

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


