-- Host: db-master-3.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=13591;

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$ylcwnE7tOe026TG67DwCxlh.D7JW4qz39cH9E0eeluJyspNrcez4x','user','ak_1273279ec7dd30db','2023-07-09 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$NDJuFv7mU7vV2TW4N0oA/aW/0SskhmQ91u4dNM8P0FXbDmuDO7Uyn','user','ak_ca6200d713e5a263','2023-05-08 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$hMhcGO0OyWhvx8UO41aQi68cFxgPGlCWUb2vtRfnAX92Hl8Az5HsY','user','ak_204f823c2dfc220f','2023-06-22 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$o2MgFyEoba0pm60wG4.U54lDqcN821L4oWdEC4K05CMDZzyKzTRt8','admin','ak_df1770bcc11bb6a5','2023-07-08 10:18: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=6042;

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


