This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Parametrizacao;
|
||||
|
||||
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
|
||||
use App\Models\Cadastro\Estabelecimento\Unidade;
|
||||
use App\Models\ExameLaboratorial\Parametrizacao\UnidadeFaturamentoUnidade;
|
||||
use App\Models\ExameLaboratorial\Parametrizacao\UnidadeFaturamentoUsuario;
|
||||
use App\Models\Model;
|
||||
|
||||
class UnidadeFaturamento extends Model
|
||||
{
|
||||
|
||||
protected $table = 'exame_laboratorial_parametrizacao_unidade_faturamento_automatico';
|
||||
|
||||
protected $fillable = [
|
||||
'unidade_id',
|
||||
'infraestrutura_id',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
public function unidade()
|
||||
{
|
||||
return $this->belongsTo(Unidade::class);
|
||||
}
|
||||
|
||||
public function infraestrutura()
|
||||
{
|
||||
return $this->belongsTo(Infraestrutura::class);
|
||||
}
|
||||
|
||||
public function unidadeFaturamentoUnidade()
|
||||
{
|
||||
return $this->hasMany(UnidadeFaturamentoUnidade::class, 'unidade_faturamento_automatico_id', 'id');
|
||||
}
|
||||
|
||||
public function unidadeFaturamentoUsuario()
|
||||
{
|
||||
return $this->hasMany(UnidadeFaturamentoUsuario::class, 'unidade_faturamento_automatico_id', 'id');
|
||||
}
|
||||
|
||||
public function getIsAllowedToDeleteAttribute()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user