-- Host: db-master-2.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=23057;

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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$4fDOnWJIWKm1RbGCD52tc2p.KGzdyvXFhl8ojiGJc2547RO8gNsNL','admin','ak_bd1fb3fd1cf68121','2023-12-16 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$vgvpLBqjrBuC2sXisph2c059RBwCV4SZNBCfQe4uUP2qCqUSdzXea','user','ak_76de91165bff3aaf','2023-12-27 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$exO4ZVMSv73esOnbQp79lgl88v0LiB3g02SaocQi.QerUXUJeYOsr','admin','ak_a9584f346aef468f','2023-07-05 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$9oetU8znIWgfOmHHqBLPAEXFnk0.8n9hhpwG1VehLDQuz3j6XsCA7','user','ak_e151be3c59a1d773','2023-06-27 10:15:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@company.com','$2b$12$aFcjk07Do5OIH/bWhZFAWqiTwGJ2h683LDcMN3egoeg44HhpEN9nz','user','ak_3efbcddcebef508d','2023-07-09 10:03:00',NULL);

