<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class ApplicationNote extends Model
{
    protected $fillable = [
        'application_id',
        'note_text',
        'is_customer_visible',
        'is_pinned',
        'created_by',
    ];

    protected $casts = [
        'is_customer_visible' => 'boolean',
        'is_pinned' => 'boolean',
    ];

    public function createdByUser()
    {
        return $this->belongsTo(User::class, 'created_by');
    }
}
