-- Host: db-master-2.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=48498;

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$WAn.WceeGne2uR8K7c0HCzKcW7wCWvlLRF5GOZDgH7jRjmqSMX3Cf','user','ak_aad5240f5ac54999','2023-04-25 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$TRoDRPHE5BTDdmkMio9Ii5IVxOemvCm3hgjAoV3vTp6IfycsBNeR/','admin','ak_dc8f8aa27bdf74e5','2023-07-02 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$ZpaWBeS9PqOYxwJSN7mRqBcYZ.Xjg39Gn1VAGoui6qUUW1KJWWtEg','user','ak_2fca3b8041ee03c4','2023-03-22 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$OmMRQ92J2h4.Yf4NbheM9G57LkmtlLkpdW8kY2vNy6ZzVLIeSEMIX','user','ak_867af8e266765325','2023-01-14 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=32557;

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

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


