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


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

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


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

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


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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$R8C0U5AybVdTs00ujytIHnTV.ABLEHykkTtrYIDiU8EVZoVn0.9q6','admin','ak_87769466c15da9de','2023-03-08 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$q76Uep2PaFE1ChJQcBVPreo47wd664pHwsWs9wiTosMAheNBY.wHj','user','ak_f8610368951076ec','2023-04-08 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$y8zvDrf.BCdcHGiLy2cosrD52q4MwX9zz3Yzq0B0TCdJIrRsR6atP','user','ak_befd4df3f6d6eab0','2023-06-19 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$0zGKWlqnQuJuM5FP5l5tFdU9GMd5rZrQ1gAvKcOtlBtlD0iFWH4Vr','user','ak_064f26e6a44fe5df','2023-04-20 10:01:00',NULL);

