30 lines
530 B
PHP
30 lines
530 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 = [
|
|
'order_id',
|
|
'total',
|
|
'due_date',
|
|
'status',
|
|
];
|
|
|
|
//Relasi
|
|
public function orders(){
|
|
return $this->belongsTo(Transaction::class, 'order_id', 'order_id');
|
|
}
|
|
//Relasi
|
|
}
|