<?php

namespace App\Models;

use CodeIgniter\Model;

class MessageAttachmentModel extends Model
{
    protected $table         = 'message_attachments';
    protected $allowedFields = ['message_id', 'file_path', 'original_filename', 'file_size_kb'];

    public function forMessage(int $messageId): array
    {
        return $this->where('message_id', $messageId)->findAll();
    }
}
