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


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

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$jH7U0bLziXExLUS/4sXApZN0/hiFK2nsGlQhfEMAJi3V/A7uIw7Yt','user','ak_82d1a855b48d0d2b','2023-03-11 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$OAZVc8ttPr0RsvCwVrOc.vANe4DgjY9BFD/F2GZiyuCQdJ0F80qvl','admin','ak_def56d41bb515b98','2023-05-24 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$LlQkKqTYPMggZgUDYhZMNMZ34uwEHxo9v0lHR8m22/PbdNmJ5C4Lv','user','ak_b2151304deb8a9db','2023-07-11 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$rZwFQZ5cQ6OuduVfxOfuQDd.fPhh61f9iIVBtx5A4kz8Eknd8tdDb','admin','ak_e47187d3da4d9333','2023-09-17 10:17:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$4TSJfrY3FEylexZmQSfVtqDDKo9GiAszvc7Zl4d6w3CPMeeN88XNJ','user','ak_b1af41bf812a829b','2023-11-09 10:22:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@example.org','$2b$12$P.Q0rqwnfMK/H7axHf/4TvQy3ew8Pwo4g1D/ORg1u.Cg5NNUU3TWu','admin','ak_0152e934deb49217','2023-04-22 10:01:00',NULL);

