-- Host: db-master-9.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=8197;

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$gWhZ/f/F5T9Ow8YGkEU8IlJ8GXk/RRgkPouncwvek9/3rak6wWKPQ','user','ak_ecde25072d72e7ea','2023-09-08 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$UsnH2gedG.PlXnJuBul7zxYT/hmOb4y2yQdlFpUCcTXfx6F8TRrt/','user','ak_afb62cc88f0ef9df','2023-12-25 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$MeggJeddRBm51pt.X3YjaA9S2gliigwEX6hq5bEBPYuo0SCBoSB9L','user','ak_8f7eeb389d687990','2023-05-13 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$sfx/OilBB3Kz.fN9Sr46lv3DTNHtsmMvAvtIV55s.wBMGSFnrkP5F','user','ak_77e9ad77ac78daf7','2023-11-09 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@corp.net','$2b$12$8hZoyHsV1QQ7/tkTgtbBinBI9KFMkKMzonHMRC6fzFRx3TvrnfUi4','admin','ak_81fff21b9e29968c','2023-08-18 10:17:00',NULL);

