<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Payroll extends Model
{
    protected $guarded = [];

    public function employee() {
        return $this->belongsTo(Employee::class);
    }

    public function details() {
        return $this->hasMany(PayrollDetail::class);
    }

    public function journal() {
        return $this->belongsTo(JournalEntry::class, 'journal_entry_id');
    }
}