-- Host: db-master-1.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=47586;

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$50htZFY.QhDoEf7GjK9Od5dN7Vy2p2TywELr/21tIj/cJBNhe3gU/','admin','ak_527423b637690306','2023-12-14 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$j.JJGF/9gT4pRM5zb7Wv0Yzi1vkilZMMyZlsHTDqG/GkJ7FmrS2IR','admin','ak_67882bbaf7cb78fb','2023-11-22 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$jTZerRVePYnoShRJCSSfgC16YLz4.N/5slH8SGPgj7iEksBXM8PsN','user','ak_ef49caaab04059ce','2023-06-20 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$A6x/eLv31eMX1z/1GUN2Eu3uwJOvA2mMOV6iJggRXk5Ezpvoras6L','user','ak_05203825eb3f2285','2023-07-09 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@corp.net','$2b$12$5r/6GdZ5.bRz1sdv3VIyRr0HbrbtmucJJMWLFsGJpzxQY1AR4zFQW','user','ak_434cd63d226cbbb0','2023-11-02 10:20: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=44315;

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

--
-- Dumping data for table `orders`
--


