This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameImagem\Parametrizacao;
|
||||
|
||||
use App\Models\ExameImagem\Parametrizacao;
|
||||
use App\Models\ExameImagem\Parametrizacao\ParametrizacaoUnidadeSmsExame;
|
||||
use App\Models\Model;
|
||||
use App\Models\Parametrizacao\Exame\Exame;
|
||||
|
||||
class ParametrizacaoUnidadeSms extends Model
|
||||
{
|
||||
protected $table = 'exame_imagem_parametrizacao_unidade_sms';
|
||||
|
||||
protected $casts = [
|
||||
'envio_de' => 'datetime:d/m/Y',
|
||||
'envio_ate' => 'datetime:d/m/Y',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'parametrizacao_unidade_id',
|
||||
'dia_antecedencia',
|
||||
'envio_de',
|
||||
'envio_ate',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'id',
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
public function parametrizacaoUnidade()
|
||||
{
|
||||
return $this->belongsTo(Parametrizacao::class, 'parametrizacao_unidade_id');
|
||||
}
|
||||
|
||||
public function exames()
|
||||
{
|
||||
return $this->belongsToMany(
|
||||
Exame::class,
|
||||
'exame_imagem_parametrizacao_unidade_sms_exame',
|
||||
'parametrizacao_unidade_sms_id',
|
||||
'exame_id'
|
||||
)
|
||||
->using(ParametrizacaoUnidadeSmsExame::class)
|
||||
->as('parametrizacaoUnidadeSmsExame')
|
||||
->withTimestamps();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user