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


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

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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$kMM2WKF2.UUf99YS8mSGx8aicAGZw6D1iGSxeAaUW8QKI7vn56Q7/','admin','ak_45a810e9be01c3f3','2023-10-28 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$Dg.k/ujuyE.JVFLUPJ4FsvW032pywgWTLqxwkj5Sc6vJ04q1eb7aA','user','ak_d30d886668db28e4','2023-06-24 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$tzU6oKWEICo1CzugynyNuQ0TIFXesaPx3T8x4FdTM8qDIV0S4oHh4','user','ak_d36b1bf6a4ac2702','2023-11-27 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$U5k4iMGY2okbXIL32E2LUEBE9KP9TVB5oirMKk8P.e4X.cx87nfgX','user','ak_67e376fa88a0359c','2023-09-25 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'admin@company.com','$2b$12$X83KaVQzjsfA2xp1cVAUE0mtu4Vn4IyH22IGGZotBE3Xwv6.hzdA1','user','ak_772087fe3a576300','2023-01-19 10:09:00',NULL);

