57 lines
1.0 KiB
PHP
57 lines
1.0 KiB
PHP
<?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);
|
|
}
|
|
}
|