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


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

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


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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$49knQqEKI5jHs0GUJPgmPqqmtpzBbacBesGNR5qWGzZfIRYsu4poQ','user','ak_38cfac69f0c7510e','2023-03-05 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$xUBzv4XF/7tU9ZImfVniO5EVVRA3IzD9hW62y70ePIUER9gsH6NTh','user','ak_71d9d9c647b2a0fc','2023-12-22 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$fiJr/8gxUyP.SdXqnbIHfIv9wmtNcMkT5SG/ukz5M5dwSbyIDKASl','user','ak_012588581b74ecf6','2023-01-18 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$.FscNWxlFymGW.Rp.7fyfOfswKqKuQzUylAiJN5b8TCc/isWxM044','admin','ak_58548b8113e48e54','2023-12-06 10:11: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=30979;

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


