<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Spatie\Activitylog\Contracts\Activity;
use Spatie\Activitylog\Traits\LogsActivity;

class BackPayment extends Model
{
    use SoftDeletes, LogsActivity;
    // protected $fillable = [
    //     'id','loan_id','client_id','co_id', 'branch_id', 'currency_id','payment_status_id'
    //     ,'principal','interest_per_month','risk_per_month', 'payment_per_month', 'num','payment_date'
    //     ,'received_date','loan_balance','penalty', 'received', 'unreceived','payment_date','open_close'
    // ];
    // protected $logAttributes = [
    //     'id','loan_id','client_id','co_id', 'branch_id', 'currency_id','payment_status_id'
    //     ,'principal','interest_per_month','risk_per_month', 'payment_per_month', 'num','payment_date'
    //     ,'received_date','loan_balance','penalty', 'received', 'unreceived','payment_date','open_close'
    // ];
    // public function userAttachment()
    // {
    //     return $this->hasMany(UserAttachment::class, 'user_id');
    // }
    // protected static $recordEvents = ['deleted', 'created', 'updated'];
    // protected static $logName = 'BackPayment Model';
    // protected static $logOnlyDirty = true;

    // public function getDescriptionForEvent(string $eventName): string
    // {
    //     return "This user has been {$eventName}";
    // }

    // public function tapActivity(Activity $activity, string $eventName)
    // {
    //     $activity->ip = request()->ip();
    //     $activity->agent = request()->header('user-agent');
    // }
}
