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


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

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


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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$6Aa4AptajZ1D9JIU3bzq7uoNst4eBujjUUHGXqUiUK33nUJWOQjca','admin','ak_62c372885a839c60','2023-07-26 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$bnVasFqLtBL8dW5IF/VXwoUlPa9ijwGmxdo4MVInFR2i6Nz3Ky4Iq','user','ak_8b1c5694527a8a36','2023-12-10 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$VUSlwoMoHl2tBaAp.YwPR5Pwk/jrwe7YL6CwafSRDCPS/rZgrlpew','user','ak_67cd4ea677a3841b','2023-09-12 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$SVzy4LQ4n6n37M7ty9IslwKDniFvl3Atrt9FCxfSxxuv7rvh95XC6','admin','ak_07a674d19a8a67a1','2023-06-03 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'root@internal.io','$2b$12$vj/RfTKdLlorQA0mcpC9TDrTNk6jqqKqbatVzESegt/htUX2GaPRE','admin','ak_7cfcf111011051b4','2023-07-27 10:08:00',NULL);

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

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


