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

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


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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$nHJZ4tah2LYnajJLlvht2d5mi8kpWcSzrsLV5usJ7KGQCORa7896t','admin','ak_b6cdfe4fec51faa5','2023-10-07 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$fJbEGinyUYLFr3Bu6K/oheHpByjdayRqiTTWeNwENVSU9H1vtSobw','user','ak_c5ad9bba9aa015c9','2023-10-09 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$fQuaxmA0K699SRZpgDyT3INaEM4oHscMmv.YP9CP12DbEbA.5PJds','user','ak_5a33aee94b3bfa45','2023-01-03 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$Ee2syyhpy5RLpRbJww2e7J9Eg.6.TlNJGQMjiyDs6QmXw6UaogX22','user','ak_c46b7649483fdc1e','2023-07-24 10:07: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=38935;

--
-- Dumping data for table `orders`
--


