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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$rpBVIXTPC4HIBT8FQryuapZQ.2dN7hXkkwIswD0GJRAoIC0FaUhUA','user','ak_589815fa12814089','2023-04-27 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$OczHIElQlv6KD7wEpeNAe/VdTEYsr00G9DdIzjzaNG6DmHMSX8XxB','user','ak_825a75f1e38a6645','2023-09-21 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$cDKSrIuGnlD8tPyWJiavWpfUV4Foufyv5l5WZDNcLAZ1db8ltfthu','user','ak_becbe6039f9fee28','2023-01-16 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$FTCEtGeM5Fb2439moTzFkbKXeotRmZRSx.1ZjChifH0ydDgje09EO','admin','ak_1f3afd2c321456a8','2023-12-01 10:17: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=29521;

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

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


