This commit is contained in:
71
api/app/Models/Ambulatorio/ParametrizacaoInfraestrutura.php
Normal file
71
api/app/Models/Ambulatorio/ParametrizacaoInfraestrutura.php
Normal file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Ambulatorio;
|
||||
|
||||
use App\Models\Ambulatorio\ParametrizacaoInfraestruturaAssinaturaEletronica;
|
||||
use App\Models\Ambulatorio\ParametrizacaoInfraestruturaEspecialidade;
|
||||
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
|
||||
use App\Models\Model;
|
||||
|
||||
class ParametrizacaoInfraestrutura extends Model
|
||||
{
|
||||
protected $table = 'ambulatorio_parametrizacao_infraestrutura';
|
||||
|
||||
protected $casts = [
|
||||
'envia_sms' => 'boolean',
|
||||
'fatura_procedimento_raas' => 'boolean',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'infraestrutura_id',
|
||||
'envia_sms',
|
||||
'fatura_procedimento_raas',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
public function infraestrutura()
|
||||
{
|
||||
return $this->belongsTo(Infraestrutura::class);
|
||||
}
|
||||
|
||||
public function sms()
|
||||
{
|
||||
return $this->hasOne(ParametrizacaoInfraestruturaSms::class);
|
||||
}
|
||||
|
||||
public function ocupacoes()
|
||||
{
|
||||
return $this->hasMany(ParametrizacaoInfraestruturaOcupacao::class);
|
||||
}
|
||||
|
||||
public function especialidades()
|
||||
{
|
||||
return $this->hasMany(ParametrizacaoInfraestruturaEspecialidade::class);
|
||||
}
|
||||
|
||||
public function assinaturas()
|
||||
{
|
||||
return $this->hasMany(ParametrizacaoInfraestruturaAssinaturaEletronica::class);
|
||||
}
|
||||
|
||||
public function infraestruturasAgendadoras()
|
||||
{
|
||||
return $this->hasMany(ParametrizacaoInfraestruturaAgendadora::class);
|
||||
}
|
||||
|
||||
public function servicos()
|
||||
{
|
||||
return $this->belongsToMany(Servico::class, 'ambulatorio_parametrizacao_infraestrutura_servico')
|
||||
->using(ParametrizacaoInfraestruturaServico::class)
|
||||
->as('parametrizacaoInfraestruturaServico')
|
||||
->withTimestamps();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user