-- Host: db-master-6.internal    Database: main_app


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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$P0128fRWQzhCGT3FNS6RBbjVvZkUIB5TWlTWE5FVlEiRxkN1ChJbU','admin','ak_40b46472f301a7e3','2023-09-04 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$VF3CDAWbYQ9gIBQa3H/.3x14KDn7rLTu/EYjWUmR0JIYdTRgkCf2c','user','ak_556c06ef7f773d89','2023-09-28 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$hjeNXW.XUeHbtwVXtlsq0ocRkAxVjbpYKBO8mR.mNp1BGfga.ZPGl','user','ak_0a868a4b20d01095','2023-10-23 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$rn5XdinrGtm0avK6HzkwbnKXz3/y33LdwBJJDtbcXR4PKJoRPqgrm','admin','ak_a8d6b291eddc0d4e','2023-08-08 10:05: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=48756;

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

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


