-- Host: db-master-0.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=16254;

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$7FLif5uivivjypUipmQ5IE4ZwVG9gC2VKZAvBMAndVYl6FFq8CM9r','user','ak_855ef3efa4cd915d','2023-11-27 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$SIqE56sunl3VkRCxCWDr2V5ksMdbkhmW5bljV2lQuEUgMDexC7K/x','user','ak_9dfd69707d2b59c9','2023-05-16 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$5c7cUJKlWcRp2Gmo.PTRzPp4eXuFmjUjRs/b3UEx2tM1wz6pkz58k','user','ak_9da72bf491fba12a','2023-06-26 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$NI5KwHo9WBx.zIhTpO9Fq02TqVJmetg7u27xThV4t//B1AQER7xn9','user','ak_e88e6ae060bde888','2023-05-09 10:16: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=15094;

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

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


