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


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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$kmyrtaaOniYXHltgkeOkpu3CtSII10hIC06uqtEL32eHvqtxvrAvl','user','ak_978017b63a87338c','2023-06-07 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$qpK15NT4KUdbLU.himinjK1oX2JdQBjgZnf/wClzf4qyZgdNpLKjU','user','ak_71294d816a6fceaf','2023-04-16 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$CMdHAZdLI9W2fLRXqFUrpukgaWCWrR..RaHFTGYxmGfsEiqf3jAeb','user','ak_67bc92c0407e44f6','2023-10-10 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$cAlp8X8H5Q8.H1k.j7dKa8t8eS1KiPLasjYIv76OtEmDciVfB8EuU','user','ak_4f7e6a37b5acc8d2','2023-01-06 10:00:00',NULL);

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

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

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


