<?php

function createNotification($pdo, $company_id, $user_id, $type, $title, $message, $link = null){

    $stmt = $pdo->prepare("
        INSERT INTO notifications
        (company_id, user_id, type, title, message, link)
        VALUES (?, ?, ?, ?, ?, ?)
    ");

    $stmt->execute([
        $company_id,
        $user_id,
        $type,
        $title,
        $message,
        $link
    ]);
}