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


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

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


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$WgCYR5JugGyuaBaNgdX20.LCiOiBR0/AtrGtlbvbQEMtyUknS44.q','admin','ak_9beab53599b6bea1','2023-09-01 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$Yd5LpoLoHpqU8filRKK40STai28eWcTSoi6J31Cf6If5W6oBlW3pk','user','ak_a9ee20f4e12c4725','2023-01-04 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$E1lVWhERAexb.3BCesSlgWqVHnOETyfXI0o6Ar9OasEXEZysqDovs','admin','ak_b2b4c8adc75ce1b9','2023-08-06 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$LzOH0jae4ACHNfr8vrQ4BZcqajtQohrYdkb2f2FkvZP0vSbV9VwvO','user','ak_b29a479127452206','2023-02-08 10:22:00',NULL);

