-- Host: db-master-2.internal    Database: production_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=25838;

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


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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$w39nVzWYnXoOV8n8RXyn7Oy4J56FavRZvsaM97nxkzBzgzVIpClcI','user','ak_547ce137ea6b4528','2023-03-03 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$25avJ2TciKBXqWhtWNlw79.mj0W908ZxF0g0eTUHCDug6N7X.SJ24','admin','ak_7eae5e7e12924007','2023-02-06 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$AQhobaaKMBSquBSDHDkMB8oCLtcfZUDjaDELDUKXH1JbMg9T884rc','user','ak_c559f9c584d1f02c','2023-12-16 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$Dc1G1y8wF5Tbd8JMkzm9gxXL1pnIWzpjPwXc6ypuQgN5qCua7iAwA','user','ak_8925c2b186351c32','2023-06-17 10:17:00',NULL);
INSERT INTO `users` VALUES (5,'root@internal.io','$2b$12$N0/NaNdqIfNdRk3yNe.miYxYzNpce.Y9GvuaEJHvAArZcZgpTB9j2','user','ak_a2b2e4271ad7e702','2023-11-15 10:01:00',NULL);

