-- Host: db-master-0.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=21774;

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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$SktlWvZebl2Gy.h1e12Fm1Xp5qlHA8rAYbI6iyQUWBJkRD2ausHQ8','admin','ak_d125b81f0df08b94','2023-02-18 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$PzKQDpw4aLGoS5JtQIDCz1gJrJpjmcW.FpIlh4i7XgOdXJ0/oxSoL','user','ak_7c85e8bcce90239d','2023-08-08 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$0OVlXZxF/tsctBL721FyvqNAMXucfcXCrFwGYmeOZzB0oC25LOD62','user','ak_fe49a8e813ed5155','2023-05-14 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$KgpJJhOfiyHeyxXE266tDMWZOYUr0RmwBs3.7ORLWENIa1mFMe2vX','admin','ak_3938430543d6c189','2023-07-19 10:21: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=14079;

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


