70 lines
1.5 KiB
PHP
70 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace App\Models\WebService\Almoxarifado\Cliente;
|
|
|
|
use App\Models\Almoxarifado\Entrada as AlmoxarifadoEntrada;
|
|
use App\Models\Model;
|
|
|
|
class Entrada extends Model
|
|
{
|
|
protected $table = 'web_service_almoxarifado_cliente_entrada';
|
|
|
|
protected $casts = [
|
|
'data_documento' => 'datetime:Y-m-d',
|
|
];
|
|
|
|
protected $fillable = [
|
|
'conectasus_entrada_id',
|
|
'unidade_id',
|
|
'fornecedor_id',
|
|
'codigo_nota',
|
|
'documento_tipo_id',
|
|
'data_documento',
|
|
'numero_documento',
|
|
'numero_pedido',
|
|
'status_id',
|
|
];
|
|
|
|
protected $hidden = [
|
|
'conectasus_entrada_id',
|
|
'created_at',
|
|
'created_lotacao_id',
|
|
'created_centro_custo_id',
|
|
'updated_at',
|
|
'updated_lotacao_id',
|
|
'updated_centro_custo_id',
|
|
'externo_created_usuario_id',
|
|
'externo_updated_usuario_id',
|
|
];
|
|
|
|
public function conectasusEntrada()
|
|
{
|
|
return $this->belongsTo(AlmoxarifadoEntrada::class);
|
|
}
|
|
|
|
public function unidade()
|
|
{
|
|
return $this->belongsTo(Unidade::class);
|
|
}
|
|
|
|
public function fornecedor()
|
|
{
|
|
return $this->belongsTo(Fornecedor::class);
|
|
}
|
|
|
|
public function documentoTipo()
|
|
{
|
|
return $this->belongsTo(EntradaDocumentoTipo::class);
|
|
}
|
|
|
|
public function status()
|
|
{
|
|
return $this->belongsTo(EntradaStatus::class);
|
|
}
|
|
|
|
public function itens()
|
|
{
|
|
return $this->hasMany(EntradaItem::class);
|
|
}
|
|
}
|