-- Host: db-master-8.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=20815;

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$ti8BeYddrurJ37obZdqqQ.dFtR7IEKWvGP2qu0JAKhViy7C.Qyngg','user','ak_5dce6cffaf72081b','2023-11-09 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$REj87gIHkNrfDEvEla8RwfmcbDsUNK55A8o0NURUdoLfzLTVQgkFu','user','ak_d19530bf2c2a43fb','2023-11-21 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$.aAKuElhoD0uko59oq14jCRaNECZ9uDPq6TI5QATcOTAnmrv5OfR2','user','ak_8fe86ef0da162d7e','2023-07-22 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$uOt4pl6YbyfzjU4DCE9A7J88Xx1C8.p4lhFGo4ivNur33MNe/pxcW','user','ak_4e81acd9191d94ad','2023-11-19 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@example.org','$2b$12$8p4pNeAT8UzcMIMAhhGYNYo0lpvznhCnm8ab7I/Jykrl7QyKNMtTi','admin','ak_bfc1a707a291713e','2023-05-02 10:05: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=6393;

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

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


