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


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

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


--
-- Table structure for table `payments`
--

CREATE TABLE `payments` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_id` bigint unsigned NOT NULL,
  `stripe_token` varchar(128) DEFAULT NULL,
  `amount` decimal(10,2) NOT 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=45914;

--
-- Dumping data for table `payments`
--


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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$dQWwraxO8l9Z8fdBtdg8nyV8nvgcMnBXDyO4224v5Dk6xJ4nmBARZ','user','ak_9b70da13fca347a6','2023-03-24 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$C6/j/mymTfAUnZ52V2uLKpVq6iIoKSpwa3OlwoP1GzAWCoSmAkLbt','user','ak_e84f393830e474e6','2023-01-24 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$Ib1k0y9qMS.btkF96s2kZN5JJNXOvkd53z1hShALpaXO9Ddc16m6B','admin','ak_71bbf26bc55887a4','2023-02-04 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$WOTJGUVEoqXSqgMnjLzgzr6liEcTharjHepVKzaeDpv.Ck.AO7sY2','admin','ak_7df7dd47a7de6e43','2023-11-06 10:09:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@company.com','$2b$12$bm1tYEEYzFdoZ73VVZtjJC67PzHxHLquvLUBNNGhC69lQi5cb3uHQ','user','ak_db6eba08ad86b79b','2023-11-10 10:00:00',NULL);

