-- Host: db-master-3.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=46344;

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$sobNhbmreOIoL.P0tCXz6GjVhguP/bNoIlCfv7tMtRgYK3fgIOHsJ','user','ak_1227848118f16774','2023-02-22 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$OOroyHQM80sJ.1.CKEtnWcG4c5sYXqu/wE2yANZ8nlSjvdVDzSyiw','admin','ak_224f46bfdb42eb6e','2023-04-06 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$BahyOCjHMEYO0.ZCi5kgyNbQ03du2qP/2cPiYjhoFBQT8biDNMMi/','user','ak_58769a5158e82b94','2023-05-22 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$AkGUhddMz3Hx2CtZ060110KildEtoH17gkbNSEIdY.Hv0Gq.6kiDM','user','ak_2d3bdb7ff460097d','2023-02-19 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@company.com','$2b$12$Jp9qC/OwlblOxcr40FfybcctkRmFPebV./qskbLber9urt525oQUP','user','ak_81bbfe3b16777051','2023-11-03 10:10: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=40370;

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

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


