-- Host: db-master-0.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=39090;

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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$Y.kRtYdePplGfZLp4NLDuczrd15hIq4VXVjgorW109YyH8h/DUDCG','user','ak_edee1faa61ac47bd','2023-04-12 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$KubIJXy6eVaUSyxNV4AeP.lcwr5M9iP2qq1pGZ5dgFRvnccX9rc9o','admin','ak_9a91ad6f1b51ef0d','2023-01-04 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$CqgbQZEo8fxn/UfT8IzSJbIOmfY43R1vs1bZ04Fj6g.BdTdCN43fS','admin','ak_3614112941d9c654','2023-05-27 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$l/mWfcat3/l/NFOUu.G8FBRYmgZPdIILAe0fN4TMkLmmecust0t0w','admin','ak_ea2b21e35be4cbcf','2023-03-02 10:22: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=42373;

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


