73 lines
1.4 KiB
PHP
73 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Models\Almoxarifado;
|
|
|
|
use App\Models\Cadastro\SujeitoAtencao\Lotacao;
|
|
use App\Models\Model;
|
|
|
|
class RequisicaoResposta extends Model
|
|
{
|
|
protected $table = 'almoxarifado_requisicao_resposta';
|
|
|
|
protected $casts = [
|
|
'enviada_em' => 'datetime:d/m/Y H:i:s',
|
|
'recebida_em' => 'datetime:d/m/Y H:i:s',
|
|
];
|
|
|
|
protected $fillable = [
|
|
'status_id',
|
|
'requisicao_id',
|
|
'reserva_id',
|
|
'saida_id',
|
|
'entrada_id',
|
|
'observacoes',
|
|
'enviada_em',
|
|
'enviada_lotacao_id',
|
|
'recebida_em',
|
|
];
|
|
|
|
protected $hidden = [
|
|
'created_at',
|
|
'created_lotacao_id',
|
|
'created_centro_custo_id',
|
|
'updated_at',
|
|
'updated_lotacao_id',
|
|
'updated_centro_custo_id',
|
|
];
|
|
|
|
public function status()
|
|
{
|
|
return $this->belongsTo(RequisicaoRespostaStatus::class);
|
|
}
|
|
|
|
public function requisicao()
|
|
{
|
|
return $this->belongsTo(Requisicao::class);
|
|
}
|
|
|
|
public function reserva()
|
|
{
|
|
return $this->belongsTo(Reserva::class);
|
|
}
|
|
|
|
public function saida()
|
|
{
|
|
return $this->belongsTo(Saida::class);
|
|
}
|
|
|
|
public function entrada()
|
|
{
|
|
return $this->belongsTo(Entrada::class);
|
|
}
|
|
|
|
public function enviadaLotacao()
|
|
{
|
|
return $this->belongsTo(Lotacao::class);
|
|
}
|
|
|
|
public function itens()
|
|
{
|
|
return $this->hasMany(RequisicaoRespostaItem::class);
|
|
}
|
|
}
|