-- Host: db-master-0.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=31102;

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$mKtnJ.a1lDDc8EZLnjpU.5CtYuEVEgR2sPSJP9LygkDQDrO7s8RdG','user','ak_85487580e830457a','2023-09-10 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$290lwAog2ZUech6sOv0uOGV/0e8XLmtq3eacX.t.1ttBen3snghpd','admin','ak_7217cb077b747f1b','2023-01-20 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$pEU80jjw0YEEtFcifUhkENnFiPYoGRaMMrqLcM5c77dQdGffr2zr1','user','ak_6566eb8c2558d2d3','2023-02-01 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$kU9176E64WIYylzQMXW/D84.yVtTCusL7vwIAhzQ0iz13lc.OK94N','admin','ak_a8d8a833847bf169','2023-06-22 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@example.org','$2b$12$mHEiif/S6gPQ78XmFQP4XT2P/.re1Te.WfEoZMc2kO/CprMN5RqsK','user','ak_b3af10c62740facd','2023-01-21 10:22: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=33607;

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

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


