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

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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$0yCptuZoF5GFf28azy/ZJndodXG0HsCIywjDl6pogBvvvQ.AguGR/','user','ak_68a94cc765a19a09','2023-10-07 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$Ng1fAJUyagYieCcUZEFMRkcFZMF0Rrmm2JdEXqBpR9dylYt8DeCu3','admin','ak_eb1d334ed5a7039a','2023-07-19 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$80I0388yLIP0506kRkEo1aozkjshR3E4RcAdDICaIPZ5ZfESp9J5O','user','ak_ae1d8f1688488803','2023-11-23 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$BqB968zGBtbXPKz6HPSl2NSdcmuH7KpZbuPHcyr6Mz1KjwrOS7fve','admin','ak_0ab33ed83e152b8f','2023-06-05 10:16:00',NULL);

