-- Host: db-master-9.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=42558;

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$QrvMhggFgqNCRBgjBcd5IY0zv1tNThXcl897TH.OICJpOIeBmDaBW','user','ak_c983e9d97fc6b3c2','2023-12-20 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$5O5d3CIaCWD1KcNUC2Xb2ushELogeujlK7enaCmc3TnvogauiGu3X','user','ak_acd85d95fe53c908','2023-11-09 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$6MoMwtVluDb3JxzVpd0YfofGJ5I2UlNSrKePST2P7/yV0G2MmPwee','admin','ak_246f2eb9cab02ed6','2023-12-27 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$/.n2jYK0fHGY9JFTRbHmDpzJciv2d3BoBClyIBDZFWHZRsgrBncGX','user','ak_357cc5480ce834f7','2023-12-19 10:01:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$IVQmzh1OVkd.adIWLqyO8/jNfowCBR7d9GSZYfJKMuMu.UXxJD98Y','admin','ak_03083a6d0238fae9','2023-11-04 10:20: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=15523;

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

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


