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


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

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$QORHvecQDO0kINIEny9iJyFezx9Ie8q3J1zh/ho4fERroTMYnzJf6','user','ak_88721c1696dfdca5','2023-03-05 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$jxtuSqnmtr0rip6yRa4H25rj8jOMY6IVHA3BO6fHVOC5OLWNqeWhw','admin','ak_aeb8d8c27f55f9dd','2023-11-15 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$UuInPTHZNzXSDj2G66xy2/jwkLBeSBH.fSMHK/we30IgFO9LoWtT4','user','ak_21cbccb95c0f467c','2023-01-07 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$z7GML7ps7kkLstaEM/4s/Lb88akNKqKkbj.CPIlxn1QfhbQnnTV3S','admin','ak_926d30b6106ab9f8','2023-04-26 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'root@internal.io','$2b$12$pVGzM7tlQpe2qnnW2CqalS2UsmDx9Lz8lKGJ2bvz9sUrRjJ0lSKVd','user','ak_6b284457c36e9cc7','2023-01-06 10:03:00',NULL);

