<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class DMLog extends Model
{
    use HasFactory;
    protected $fillable = ['delivery_man_id', 'message', 'amount_to_delivery_man', 'amount_to_company'];

    public static function createLog($delivery_man_id, $message, $amount_to_delivery_man, $amount_to_company)
    {
        DMLog::create([
            'delivery_man_id' => $delivery_man_id,
            'message' => $message,
            'amount_to_delivery_man' => $amount_to_delivery_man,
            'amount_to_company' => $amount_to_company,
        ]);
    }
}
