27 lines
554 B
PHP
27 lines
554 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
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');
|
|
}
|
|
}
|