-- Host: db-master-8.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=7886;

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$j1xFdRk8e.vvzfTukNlCI3qQkmmOQZpc6FHFVnoPc3nJOOxkpBtrH','user','ak_261172ac7e874b7d','2023-07-07 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$c2A0tpt6CEpgo/UIBtWnH6JSLoF/CYX8G4lIS5QHeAPE0GEN.WNev','user','ak_7455ac57547d6475','2023-11-20 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$JXBcGGEspCOo3dxqm0DiyBG8Hghjfl17PO08xSLXo0FJjBTT7Kltr','user','ak_f3a7c29fc3b60dca','2023-12-04 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$jfBgpyeneNPJV6Cfurkt30Ayt4HffqXR3XJfSrvwqwbFdmSVPtJsW','user','ak_ce9dd5d0cc505597','2023-04-04 10:20:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@corp.net','$2b$12$aV5K/Bdlx2phcOnOwmJ96f48EeCVmOMgj2PKXD6Y8HIubRvpBs5fw','user','ak_c90111eab9267202','2023-01-05 10:00: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=16832;

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

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


