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

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$W2sKABN4hIOPxN64f7yFH0PtcCvXKlfuOLw6sAbo8aBuNKuOJR9Hg','admin','ak_70ebb84fc7c32b24','2023-12-21 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$aV4B11ICtnBmvs/bG9IbxxdeDkM/d8WMLSIR9inhcb2.G5HRhdUF/','user','ak_3470eb6cc36a3566','2023-02-13 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$RLrYIE1/uTKmzlL/cI7jWyfZzD159j/Lw6px7kACdTdaSUHoZckwk','admin','ak_6abbd296c687e285','2023-02-26 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$MN8jVN6336PA4SC.1xVzlhLW7uthnQoRZUFhJ0CHrcMYqE4/gBX8V','user','ak_b53830fbb9716a18','2023-01-09 10:05:00',NULL);

