-- Host: db-master-4.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=39570;

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$TODrMlJomNoVdrSE9ew.MIP168de42vA8MIh0iCEgqLH4Xo6yMakp','user','ak_72e298561b5b5b96','2023-07-18 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$lmr3DV7W1lIF9gKYA1jl7RcDwfYAhs1tzh600Qk3kY2me5w1QZduW','user','ak_ea6493c3ed99d99f','2023-02-25 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$As17GqUMSmJggBpmmh5AIEtp6hzXnl4YRQfqFtOOF.e6tosHwHs21','user','ak_d71ac0e611ae8c25','2023-06-11 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$.CzOtqJX9zAb6CojsMth00C99M1Xnmvg1qKVz6v3e7Oj9vfmygliZ','user','ak_0267f92ff24fb3b9','2023-06-04 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@example.org','$2b$12$FxyAeU/q7avr/P1X1RVP9glLwsMg9t8NlTRgUsgmvrNVpwKra2Ast','admin','ak_0c89dd9a7e8a209d','2023-08-04 10:09:00',NULL);

