28 lines
525 B
PHP
28 lines
525 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Relations\Pivot;
|
|
|
|
class MediaCooperation extends Pivot
|
|
{
|
|
protected $table = 'media_cooperations';
|
|
|
|
protected $fillable = [
|
|
'cooperation_id',
|
|
'media_id',
|
|
'status',
|
|
'rejection_reason',
|
|
];
|
|
|
|
public function cooperation()
|
|
{
|
|
return $this->belongsTo(Cooperation::class, 'cooperation_id', 'id');
|
|
}
|
|
|
|
public function media()
|
|
{
|
|
return $this->belongsTo(Media::class, 'media_id', 'id');
|
|
}
|
|
}
|