35 lines
601 B
PHP
35 lines
601 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Refund extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*
|
|
* @var array<int, string>
|
|
*/
|
|
protected $fillable = [
|
|
'transaction_id',
|
|
'total',
|
|
'due_date',
|
|
'status',
|
|
];
|
|
|
|
protected $casts = [
|
|
'id' => 'string',
|
|
];
|
|
|
|
|
|
//Relasi
|
|
public function transaction(){
|
|
return $this->belongsTo(Transaction::class, 'transaction_id', 'id');
|
|
}
|
|
//Relasi
|
|
}
|