34 lines
629 B
PHP
34 lines
629 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class Report extends Model
|
|
{
|
|
use SoftDeletes;
|
|
|
|
protected $table = 'reports';
|
|
|
|
protected $fillable = [
|
|
'title',
|
|
'publication_date',
|
|
'link',
|
|
'proof',
|
|
'description',
|
|
'status',
|
|
'rejection_reason',
|
|
'media_id',
|
|
'order_id',
|
|
];
|
|
|
|
public function order(){
|
|
return $this->belongsTo(Order::class, 'order_id', 'id');
|
|
}
|
|
|
|
public function media(){
|
|
return $this->belongsTo(Media::class, 'media_id', 'id');
|
|
}
|
|
}
|