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


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

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

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


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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$pbHp5DIXte03AKpBglQ2ONilLbyft1wnvAKXJ72KHiTc7V6ORTkFU','admin','ak_e93f84af6cbccf03','2023-05-11 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$7VFUsCqh7pBP2uMaSantWghK9Jr0uITCE4ygL7NkPXN95vJxp08XR','admin','ak_e6c588125b67b4e9','2023-12-20 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$edu1dz9eldUgyFIzP1jNJSCpEwH9xWIOx9yqXiOcXWEi6hwo0A3wO','user','ak_34101a99cb3a83d7','2023-02-22 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$hLzc0svoTLM23dugxi081rJyK5FctKo75mxR1.21BhnJ6eClwvH.6','user','ak_194540d2a8f233c9','2023-07-17 10:17:00',NULL);

