This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameImagem\Parametrizacao\ControleJornada;
|
||||
|
||||
use App\Enums\ExameImagem\Parametrizacao\ControleJornada\Tipo;
|
||||
use App\Models\ExameImagem\Jornada\Jornada;
|
||||
use App\Models\Model;
|
||||
|
||||
class TipoControleJornada extends Model
|
||||
{
|
||||
|
||||
protected $table = 'exame_imagem_parametrizacao_controle_jornada_tipo';
|
||||
|
||||
protected $fillable = [
|
||||
'descricao'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
|
||||
public function getIdentificadorAttribute()
|
||||
{
|
||||
if ($this->id === Tipo::ATENDIMENTO) {
|
||||
|
||||
return Tipo::ATENDIMENTO;
|
||||
}
|
||||
if ($this->id === Tipo::EXAME) {
|
||||
|
||||
return Tipo::EXAME;
|
||||
}
|
||||
}
|
||||
|
||||
public function jornadaExameImagem()
|
||||
{
|
||||
return $this->hasMany(Jornada::class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user