-- Host: db-master-4.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=43566;

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


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=10019;

--
-- Dumping data for table `sessions`
--


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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$535rJ1IasIDxzjSi5p6K5.LJmz24Z3BzasMkbaocCwtqivl7vIBxO','admin','ak_f984c027c5fd27ec','2023-06-11 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$Czm/Rq6klnXz31OdunhBnz/Dn7iSkOIZ55wvXz0swniWAe3ZV7d/Y','admin','ak_3057e82975fdf286','2023-01-10 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$r788oZT9K97j93XBvHG6X2xxTsI97iPqo2L6Y4f8eyDQB919O6YqX','admin','ak_67523da466336c1d','2023-12-01 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$a873Pgyk8NK/vZmQmPG9TuNuDrLQFnQ9BgHLIoncls4SY7Rt2micQ','user','ak_462f2b1d04e61453','2023-09-23 10:04:00',NULL);

