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


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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$.9QxQ3m3Ccmj6XFrzEEaAz8Ieh5SjF.ODEgPqtSSDH85QiQPshI3x','user','ak_72ed07a0b42a5099','2023-05-24 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$CsR9QnnrzApkXIjVUdRGaJ.Q5XchjV2nHZijsT/DPyE9aCMSjXH1.','user','ak_097295fa95eee9c0','2023-09-24 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$ivxHoUp.1EZl.fwM/2.Gyg/Nks5gmAp2bUi96Pd6JJc8fmkVR8ZUi','user','ak_7068cb61d77103de','2023-12-03 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$lClFVsAPmptCzdup0ULitx64BwMKm7k4lDhGD9SkYF5UOIKEDxHDB','user','ak_4f2ec34d61fcc0d4','2023-10-13 10:23:00',NULL);
INSERT INTO `users` VALUES (5,'admin@corp.net','$2b$12$Ebfu1YbudT1j64FeFBPTvP9vWv6Jgb89Zyy4/2znrpzx9ymwg/ZMw','user','ak_73f2b81334f84a2f','2023-10-07 10:15:00',NULL);

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

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

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


