# Add missing imports to db/events.rs
sed -i '1i use crate::models::PaginatedResponse;' src/db/events.rs

# Add missing import to handlers/events.rs 
sed -i '/use crate::models::/s/$/,PaginationParams/' src/handlers/events.rs

# Fix ApiError::Internal to ValidationError (check what exists)
grep "enum ApiError" -A 10 src/error.rs

# Fix the admin_notes type issue
sed -i 's/admin_notes: &Option<String>/admin_notes: Option<&String>/' src/db/events.rs
sed -i 's/&req.admin_notes/req.admin_notes.as_ref()/' src/db/events.rs

# Replace Internal with ValidationError
sed -i 's/ApiError::Internal/ApiError::ValidationError/g' src/db/events.rs
