-- Host: db-master-5.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=17305;

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$8QCb1DgmBXXG9Y4JhapnGYLNU28HiF7y1Iry/QJM1yIo8c2Huii8m','admin','ak_8b32b37fa5bee68e','2023-11-12 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$DrHOYW8bllu1nsDV7zz/A0mcY.8KtGIZ7mK0XG7q1QocYhJ7.s0Do','user','ak_db50f3fcf79d98b3','2023-09-20 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$5CbroDrO3bekcp/CFNPQWcl8jeqka3ocJgNZKqO42uKN5dFq84tx0','user','ak_54e887946d8c2b11','2023-11-07 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$e1.if5WWQ7GvW03QlGIhrqqt5fJMgaMwMNoW8DRa1JSedkVQh5kX0','user','ak_fcb8750abe2221c5','2023-05-01 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'admin@company.com','$2b$12$v4NMzpr.8wLck8z.62fJF9DeBOdgnEndqbUG4hTA930DkN7wjW6CQ','user','ak_4f6bc0705e5259c8','2023-03-12 10:07: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=7797;

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

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


