27 lines
518 B
PHP
27 lines
518 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\Pivot;
|
|
|
|
class MediaOrder extends Pivot
|
|
{
|
|
protected $table = 'media_orders';
|
|
|
|
protected $fillable = [
|
|
'order_id',
|
|
'media_id',
|
|
'status',
|
|
'rejection_reason'
|
|
];
|
|
|
|
public function order(){
|
|
return $this->belongsTo(Order::class, 'order_id', 'id');
|
|
}
|
|
|
|
public function media(){
|
|
return $this->belongsTo(Media::class, 'media_id', 'id');
|
|
}
|
|
}
|