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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$.G2TDH5cKplPPeTZ22cUEYhInJ5yFq2V7zblBHodw7r/EiccGmIFB','admin','ak_e3e8b03b6d185a8b','2023-01-14 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$rI6uUehdUIn.UaMDsRN6kcepME/LZB2/h0LhD/4KE2xbNkwTNcjEd','user','ak_0803653b35388d34','2023-12-25 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$RBOAJo5qCq4pAhMzJc3RWmzZ.n.po8NFsHzhf7AD91myFdry1bzir','user','ak_9e07091c0094a5b3','2023-02-06 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$sr6os8nzKPruizlw0rpPKSy3XjhmbOklhmtA78YYuQrC9FY0jFg4A','admin','ak_b3d0dc0fe0d31a91','2023-10-19 10:23: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=5946;

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

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


