-- Host: db-master-1.internal    Database: webapp_db


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$BgoTHP/DWUnYdiPm07oZhpKViyhb1gyfmf/kpDSDcfuxs9u3BdxpT','admin','ak_b0ba3c3982b992d4','2023-05-16 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$.VCjyWmHQ05CXJs.B382Vgnor088XVQPvJJOQxYOSKyRXlfRwAw94','user','ak_f823532d7a972dc5','2023-04-22 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$mMG5O5nEdmYWAP5IqG4TFNSv9MpN2ZmyFQ.LHNH..OtgnbGWFnuYI','admin','ak_c28cefe3890d436d','2023-07-02 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$rOoKcv4.ZB2dQA8FnXyZpOXNFqcnb8qLbh7m.Qq906tMN6R8EEGeH','user','ak_3134dbc7d3241432','2023-02-18 10:08:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@internal.io','$2b$12$HJIPWXLq/4SxJWmS5/NusVlkS4O9R1VGJHUXunBppBucNmVVyd46s','admin','ak_e2350efe05c1477d','2023-05-13 10:07:00',NULL);
INSERT INTO `users` VALUES (6,'admin@corp.net','$2b$12$Pm1SzXfrOeEySj2yyMpUuQl9ctm5yWQqmQQVcx52IcS8Jwx3ra9ig','user','ak_fda062e15a8d92de','2023-05-07 10:09:00',NULL);
INSERT INTO `users` VALUES (7,'service_account@company.com','$2b$12$R8OHkm.6TLVH8EC2wJGzsqR6DN5j1i3bzBwKweqAXd1AgDkuTIHW2','user','ak_43d113a9016032e7','2023-04-15 10:09: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=19017;

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


