60 lines
1.3 KiB
PHP
60 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Models\ExameImagem;
|
|
|
|
use App\Models\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
use App\Models\Cadastro\Estabelecimento\Unidade;
|
|
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
|
|
use App\Models\ExameImagem\Parametrizacao\TipoCotaPrestador;
|
|
|
|
class CotaPrestador extends Model
|
|
{
|
|
use SoftDeletes;
|
|
|
|
protected $table = 'exame_imagem_parametrizacao_cota_prestador';
|
|
|
|
protected $fillable = [
|
|
'id',
|
|
'unidade_id',
|
|
'infraestrutura_id',
|
|
'cota_tipo_id',
|
|
'inicio',
|
|
'fim',
|
|
'cota_valor',
|
|
'cota_unidade',
|
|
'observacao',
|
|
];
|
|
|
|
protected $hidden = [
|
|
'created_lotacao_id',
|
|
'created_centro_custo_id',
|
|
'updated_at',
|
|
'updated_lotacao_id',
|
|
'updated_centro_custo_id',
|
|
'deleted_at',
|
|
'deleted_lotacao_id',
|
|
'deleted_centro_custo_id',
|
|
];
|
|
|
|
public function unidade()
|
|
{
|
|
return $this->belongsTo(Unidade::class);
|
|
}
|
|
|
|
public function infraestrutura()
|
|
{
|
|
return $this->belongsTo(Infraestrutura::class);
|
|
}
|
|
|
|
public function tipo()
|
|
{
|
|
return $this->belongsTo(TipoCotaPrestador::class);
|
|
}
|
|
|
|
public function getIsAllowedToDeleteAttribute()
|
|
{
|
|
return true;
|
|
}
|
|
}
|