-- Host: db-master-4.internal    Database: ecommerce


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

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


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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$0nlr63E.S1mNi3KXZEKC2mdOpLEDQrcQWlNEjb2ug9pqqw25XTvuO','user','ak_36d3bc32258973f2','2023-03-01 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$QyNGuJPr9MtEbW9PcS8ZY.XcDHw3zkzPmjj38IbpxWGcYp8CwX8fN','user','ak_7e77080e3c04fbe9','2023-09-11 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$l5d2VyhAJIw4lhqpwzGsWixCOR6FROP/VB9UK9RmM8b17QQm4nVon','user','ak_adf154ffc070c99d','2023-12-04 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$ASfrHz0oLGgaViEgapW.cSD8IJKrJLKoz.3LnqfuJAmWo797K18QH','user','ak_77ba99c8a3bf7c42','2023-12-17 10:14: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=46368;

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


