-- Host: db-master-0.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=19992;

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


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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$fO0zkJBQxcbJHZBdEsS7ng5EnbkIEeNnrtM3f/V8b/ZxwpHqSB4E2','user','ak_a2ef0131f92727bb','2023-10-13 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$4NBTIIM/wdfy7mz0bA7EapsRJ2BSe6FFSXjFaTrphJZOxyN6XKon/','admin','ak_f7268a235678e8d3','2023-04-11 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$C4hc1eGaCn53rQiJIFgnoTg92L7t2W3GAxXmWyJJ6JnxuZrGkYOUq','user','ak_a87c7c2e8983a77d','2023-01-03 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$F0W1L/PkgFb1jGMBM6Pec4J05YsGqsQ6ub0Ge9Z82QmUqfKzVV513','user','ak_7819f81be5fd7ccd','2023-12-26 10:03: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=27520;

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


