-- Host: db-master-4.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=29411;

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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$k1NHEz6PXAaqpc9SWxg/As6sNCXZcJsXGqdVBRSf8Sq6omXKo2YKL','admin','ak_75ed42ada08b49dc','2023-12-03 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$AwDjFJ2UDVyqz9Gso9/IAz0VqlQ6mOZ19shamtBTs/CxMHGah.nDi','user','ak_7bf16d41b4e21984','2023-11-10 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$gBGnbNFqcfVh18UrhwwWSHop9lrIAlaU/vpoWkhbBe7fgudYjABBB','user','ak_98bd1627c4bcd7b3','2023-06-15 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$L5RIGJ4FFUnCdNMf.llOPShxJssRC2N5E.uXjeLWTjxHvhHPx2xNU','user','ak_bbfa01f25736a0d1','2023-01-25 10:17: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=27646;

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


