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


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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$k7swSzL89pO5sJ.14ckQ.T8VRx2vetzHbqlfVqllLz.d12sqC3pyc','user','ak_a398ad864c72bf70','2023-03-18 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$4V8PxgyyKKDXd/oNLXp77YxeGz.cZOpju4edR90VWWabGUt.u7JQt','admin','ak_1addebb8188e2c2b','2023-10-07 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$UR2.vWHTcYHW308YzDVgji27orSHyttQATrKOoS218KT3PcbDGF7a','admin','ak_32977f616c18aa7b','2023-08-09 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$uU0zxLMKUMa1eUiFZokArlMvBzuyC137zzjOabHujC33DGuqrsu6/','user','ak_caf99b0c25d22578','2023-09-01 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@internal.io','$2b$12$NHkIZanToGvV.jz8/zc4LMFLCtUi12yCTwiZFEcfZdhLJlqwej45F','user','ak_f6a65645e238a591','2023-04-20 10:01:00',NULL);
INSERT INTO `users` VALUES (6,'service_account@internal.io','$2b$12$AxC9iMMU0sYsX8s7g/6rWzoEBVhZc5aesGB/7T/dzJRVZNqiQOEav','user','ak_0ad244d173ef25dc','2023-06-28 10:00: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=4536;

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

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


