<?php

namespace App;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use App\Scopes\MessageScope;

class AvanseFees extends Model
{

    protected $table = 'avanse_fees';

    protected $fillable = [
        'finance_id', 'feeCategory', 'feeCode', 'feeAmount', 'waiverAmount', 'paidAmount', 'feeMethod', 'scheduleTerms', 'feeBalance', 'finFeeReceipts', 'created_at'
    ];

    public function save(array $options = array())
    {
        $missingKeys = array_diff(array_values($this->fillable), array_keys($this->getAttributes()));
        foreach ($missingKeys as $missingKey){
            $this->$missingKey = '';
        }
        parent::save($options);
    }
}
