-- Host: db-master-1.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=38477;

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$UhW1xcdp4kworAO8QIIklqh2rMAeBCo3Ieqb2nHn0Cy003xODG4DL','admin','ak_e45949c087627d11','2023-08-07 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$dHQgG4./xbRlDaSCDNz51o0mLhPF1kPj.9PBr2GkitegWkI5dERYQ','user','ak_bd974b33fd155dfa','2023-01-22 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$YwGMxaG9QQoyVGeSKc7W31GsdpwnJ9U8PSEIEVPTM7TfOHGyKsYFM','admin','ak_2c2bb54631d34756','2023-10-13 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$JI9vD/nPDZ/Vwq3q2vvrBSPhQhpz7T3ym1RUEAiW6/F38y5pCTRC1','admin','ak_c1fc442d2d2b236f','2023-10-20 10:12:00',NULL);

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

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


