2019-05-22 17:10:16 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
2019-06-17 09:22:10 +02:00
|
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
2019-05-22 17:10:16 +02:00
|
|
|
|
|
|
|
|
class Media extends Model
|
|
|
|
|
{
|
2019-06-17 09:22:10 +02:00
|
|
|
use SoftDeletes;
|
2019-05-22 17:10:16 +02:00
|
|
|
protected $table = "medias";
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the dossier that owns the media.
|
|
|
|
|
*/
|
|
|
|
|
public function dossier()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo('App\Dossier', 'dossier_id');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the sujet that owns the media.
|
|
|
|
|
*/
|
|
|
|
|
public function sujet()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo('App\Sujet', 'sujet_id');
|
|
|
|
|
}
|
2019-05-29 14:05:54 +02:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the typemedia that owns the media.
|
|
|
|
|
*/
|
|
|
|
|
public function typemedia()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo('App\Typemedia', 'typemedia_id');
|
|
|
|
|
}
|
2019-06-17 09:22:10 +02:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the typevue that owns the media.
|
|
|
|
|
*/
|
|
|
|
|
public function typevue()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo('App\Typevue', 'typevue_id');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the langue that owns the media.
|
|
|
|
|
*/
|
|
|
|
|
public function langue()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo('App\Langue', 'typevue_id');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the copyright that owns the media.
|
|
|
|
|
*/
|
|
|
|
|
public function copyright()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo('App\Copyright', 'copyright_id');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the etiquette that owns the media.
|
|
|
|
|
*/
|
|
|
|
|
public function etiquette()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo('App\Etiquette', 'etiquette_id');
|
|
|
|
|
}
|
2019-05-22 17:10:16 +02:00
|
|
|
}
|