-- Host: db-master-3.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=5535;

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$9N4IfRG/Sq2ZHHytV.h1E/0DQuBG9w4.CMuUW32xfmxY/tSIAzSd4','user','ak_7e3036cb93920ecd','2023-09-24 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$tMeI9bv9WsswpJjjM2kL8BeWN3mYa4hayrmTmviZziNCqlRTMc/Xx','user','ak_0574be2c4bd7351d','2023-09-02 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$08S06rpA5WwuXHrvxG5hCF8RYHPj91ngQr4mIs9Ir1etEtK9NIJlQ','user','ak_cd7f061ce3d8b784','2023-12-25 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$i8M9SgsPp9jZdFNYVTFMOss6hV2qRRTfEhfvNvTZrcmFRmh573E0G','admin','ak_a1c2eaeaa88a8cba','2023-03-10 10:18:00',NULL);

