-- Host: db-master-2.internal    Database: webapp_db


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

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$x/vvia/w3V.vrI31AZ/ZgHE15rYwkDIE6ebDydCAO/y5yB0mQzEuF','user','ak_58397f6d0cae063b','2023-05-16 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$tuZNex7r0.IUGfkjopC4cQvMd7CAVhCmuyZ4RYvi8U8Iz9AI3k9r2','user','ak_8f9e6d21f8df9b95','2023-09-10 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$PxHxTlIMntyAAMHfn/xfGMlYej.D7PP63ZM/a.V15bQ73L5hmAXyx','user','ak_d7852a7a2d7f9ec2','2023-07-06 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$r7/Wc.3SLJAozs0Aqqpt6nVXxmc06eBNRsV6uBZoClvjM3VMjbf3g','user','ak_8108f89d245cb3c9','2023-05-05 10:01:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@company.com','$2b$12$m2dRVrPXNrHGrgRTBfvXuJPm7DXIxac5OpuRL0Y07g4//IMQ2i/jh','user','ak_0ade38a096089db7','2023-10-02 10:00:00',NULL);

