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


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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$GDEQDfjpOygh89jc6O95060Ce8n8dExP9mARozwwiV1efE3caKnna','user','ak_915a4f23bb225f67','2023-03-23 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$zhEptA7r6gX.tdzJAUljp/XJyFJP/TXbF5lFZPaR7a6K4D6fMJMsb','user','ak_3667e0170608e351','2023-05-18 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$a3NurSFqMz0PGpEeaxcPh29QoTdXdMtPSO3z85qUvgaw50qV/SeCI','user','ak_8be74af5e467e393','2023-03-01 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$DLHwyQk1DUFZoW99IIhpajgADPmb/plUqOX0lrbJowXoDI3QCk3Wb','admin','ak_eff465d45c92aa83','2023-11-01 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@example.org','$2b$12$uD/qS1xwUQDkqnXUdbiYystwl34laRDKFxbjXovIQ58H1bRPR0yAM','admin','ak_5239efa6c7fc4eb5','2023-03-27 10:00:00',NULL);
INSERT INTO `users` VALUES (6,'service_account@corp.net','$2b$12$VyJU8FOvx1fNpLtYyjXmIwPrOTXeSzEq9GySYMJEJ78vlV3uIdAoV','user','ak_00e9772343d3f08c','2023-04-04 10:01: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=43461;

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


