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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$AWTCFcQ/OPCgVjB7nsbxoPCNPCTB6.TMk.NiGoWHjpj.Ta/BvjnVI','user','ak_9e3c0c9b28022286','2023-11-26 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$Q5zhxffI3fTTZhabelJNH9KKI8X0a0/EDKzU9DKkIbBmdXIayldlV','admin','ak_212c7157cd0320bd','2023-01-02 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$KdcjyJF8fuhZd9144FUyJhRTPTzQhCImx/zA.35tin2Eg921xhE1B','user','ak_4db7353257b310cf','2023-04-16 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$SSuZjkYYdVhirHkgeD1d5cd4T09kUs9y4RVWnHdwSzmgm1LeGIioC','user','ak_e9499a34479425b8','2023-12-22 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@company.com','$2b$12$9.XuxvtT75dJi9yvPMBD0C8.Kaa6n07XzLKS5NUU8pQTEeC04dxUv','admin','ak_2e029a8de50ae7e8','2023-05-06 10:13:00',NULL);
INSERT INTO `users` VALUES (6,'admin@example.org','$2b$12$38irfdC5E9CWcp5QrcXRmQL3GVbThgTfj5flcvsL4lSXpVjyGcpGy','admin','ak_e32afff04dda7407','2023-06-01 10:03: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=14950;

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

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


