pub async fn get_user_role_notifications(
pool: &Pool<MySql>,
user_id: i64,
page: i64,
per_page: i64,
) -> Result<Vec<UserNotificationWithRoleNotifications>>Expand description
Retrieves all role notifications for a user with acknowledgment status.
This function fetches role notifications for all roles a user has, along with information about whether the user has acknowledged each notification.
§Arguments
pool- Database connection pool for executing the queryuser_id- ID of the userpage- Zero-based page numberper_page- Number of records to fetch per page
§Returns
Ok(Vec<RoleNotificationWithAcknowledgment>)- Successfully retrieved notifications with acknowledgment statusErr(anyhow::Error)- Failed to fetch notifications