This commit is contained in:
56
api/app/Models/Intranet/Cliente.php
Normal file
56
api/app/Models/Intranet/Cliente.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Intranet;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Cliente extends Model
|
||||
{
|
||||
protected $connection = 'intranet';
|
||||
|
||||
protected $table = 'cadastro_cliente';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'sistema_id',
|
||||
'municipio_id',
|
||||
'nome',
|
||||
'email',
|
||||
'site',
|
||||
'link',
|
||||
'logotipo',
|
||||
'ativo',
|
||||
'motivo_inativacao',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
'deleted_at',
|
||||
'id',
|
||||
'sistema_id',
|
||||
'municipio_id',
|
||||
'email',
|
||||
'site',
|
||||
'sms_senha',
|
||||
'sms_usuario',
|
||||
'safecare_usuario',
|
||||
'safecare_senha',
|
||||
'integracao_v1'
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'ativo' => 'boolean',
|
||||
'ativo_app_conectasus_cidadao' => 'boolean',
|
||||
];
|
||||
|
||||
public function sistema()
|
||||
{
|
||||
return $this->belongsTo(Sistema::class);
|
||||
}
|
||||
|
||||
public function municipio()
|
||||
{
|
||||
return $this->belongsTo(Municipio::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user