-- Host: db-master-6.internal    Database: webapp_db


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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$JYHjOqrkhSQ/qQgxHmCpsUSLLK.X6ep7NrBT/vJbB4dFlIjEXwboB','admin','ak_e7c73d0b3e76bf00','2023-05-24 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$DzNg7sTnrQ4crOuFwheVlQlg/xodXMPCR48R4Gakpx3lRqShkzyA7','user','ak_d4f961a76693351b','2023-05-28 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$GNHkzlID8.S9D1NHnM3O4h0ww00de2AbA5F8FT0j8l57pKXmQ.MUM','user','ak_7f52040b5b4d9d09','2023-12-13 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$Zz4.BCDa//70vIHKTa6SifDBZvI9mEZ868cDY71O1AcMaaCV.BDmx','user','ak_d263a9880da41f0b','2023-01-11 10:03:00',NULL);

--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=22374;

--
-- Dumping data for table `audit_log`
--


