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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$tNu5qvIodtN2ecHy4rGWADh/jO1x/vlbd97uVblkImyNIUYmVatbx','user','ak_da657241e8ab3d2e','2023-08-16 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$3PeOxIpclhVjKMKQ0FxGXosV3lZUaCRpGhjRTS64PBX.mBNS75UMc','user','ak_49d834a6c30418ec','2023-01-20 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$D0JnBhYLc20WzDsJnTuhBXqV5c48yUDOOGXg.6ZhtgaSpnWK7aN.G','user','ak_924a0fa6a07dcf34','2023-08-14 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$E6Xzy2jQ4uE9aFCC5lJMwqXvcBQgVN/rnAkXqO7WlXCP/ieKXC4HU','user','ak_3cf669b7e9796367','2023-12-22 10:09:00',NULL);

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

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

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


