This commit is contained in:
32
api/app/Models/Intranet/Cadastro/Funcionalidade.php
Normal file
32
api/app/Models/Intranet/Cadastro/Funcionalidade.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Intranet\Cadastro;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Funcionalidade extends Model
|
||||
{
|
||||
protected $connection = 'intranet';
|
||||
|
||||
protected $table = 'cadastro_funcionalidade';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'modulo_id',
|
||||
'nome',
|
||||
'identificador',
|
||||
'manual',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_by',
|
||||
'created_at',
|
||||
'updated_by',
|
||||
'updated_at',
|
||||
];
|
||||
|
||||
public function modulo()
|
||||
{
|
||||
return $this->belongsTo(Modulo::class);
|
||||
}
|
||||
}
|
||||
26
api/app/Models/Intranet/Cadastro/Modulo.php
Normal file
26
api/app/Models/Intranet/Cadastro/Modulo.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Intranet\Cadastro;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Modulo extends Model
|
||||
{
|
||||
protected $connection = 'intranet';
|
||||
|
||||
protected $table = 'cadastro_modulo';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'sistema_id',
|
||||
'nome',
|
||||
'identificador',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_by',
|
||||
'created_at',
|
||||
'updated_by',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
23
api/app/Models/Intranet/Empresa.php
Normal file
23
api/app/Models/Intranet/Empresa.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Intranet;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class Empresa extends Model
|
||||
{
|
||||
protected $connection = 'intranet';
|
||||
|
||||
protected $table = 'cadastro_empresa';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'nome',
|
||||
'site',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
40
api/app/Models/Intranet/Estado.php
Normal file
40
api/app/Models/Intranet/Estado.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Intranet;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class Estado extends Model
|
||||
{
|
||||
protected $connection = 'intranet';
|
||||
|
||||
protected $table = 'cadastro_estado';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'pais_id',
|
||||
'codigo',
|
||||
'nome',
|
||||
'uf',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
'pais_id',
|
||||
];
|
||||
|
||||
protected $with = [
|
||||
'pais'
|
||||
];
|
||||
|
||||
public function pais()
|
||||
{
|
||||
return $this->belongsTo(Pais::class);
|
||||
}
|
||||
|
||||
public function municipios()
|
||||
{
|
||||
return $this->hasMany(Municipio::class);
|
||||
}
|
||||
}
|
||||
39
api/app/Models/Intranet/Municipio.php
Normal file
39
api/app/Models/Intranet/Municipio.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Intranet;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class Municipio extends Model
|
||||
{
|
||||
protected $connection = 'intranet';
|
||||
|
||||
protected $table = 'cadastro_municipio';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'estado_id',
|
||||
'nome',
|
||||
'ibge',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
'estado_id'
|
||||
];
|
||||
|
||||
protected $with = [
|
||||
'estado'
|
||||
];
|
||||
|
||||
public function estado()
|
||||
{
|
||||
return $this->belongsTo(Estado::class);
|
||||
}
|
||||
|
||||
public function logradouros()
|
||||
{
|
||||
return $this->hasMany(Logradouro::class);
|
||||
}
|
||||
}
|
||||
25
api/app/Models/Intranet/NotaVersao.php
Normal file
25
api/app/Models/Intranet/NotaVersao.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Intranet;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class NotaVersao extends Model
|
||||
{
|
||||
protected $connection = 'intranet';
|
||||
|
||||
protected $table = 'cadastro_nota_versao';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'sistema_id',
|
||||
'versao',
|
||||
'titulo',
|
||||
'descricao',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
29
api/app/Models/Intranet/Pais.php
Normal file
29
api/app/Models/Intranet/Pais.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Intranet;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class Pais extends Model
|
||||
{
|
||||
protected $connection = 'intranet';
|
||||
|
||||
protected $table = 'cadastro_pais';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'codigo',
|
||||
'nome',
|
||||
'codigo_esus'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
|
||||
public function estados()
|
||||
{
|
||||
return $this->hasMany(Estado::class);
|
||||
}
|
||||
}
|
||||
22
api/app/Models/Intranet/RamoAtividade.php
Normal file
22
api/app/Models/Intranet/RamoAtividade.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Intranet;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class RamoAtividade extends Model
|
||||
{
|
||||
protected $connection = 'intranet';
|
||||
|
||||
protected $table = 'cadastro_ramo_atividade';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'nome',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
35
api/app/Models/Intranet/Sistema.php
Normal file
35
api/app/Models/Intranet/Sistema.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Intranet;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class Sistema extends Model
|
||||
{
|
||||
protected $connection = 'intranet';
|
||||
|
||||
protected $table = 'cadastro_sistema';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'empresa_id',
|
||||
'ramo_atividade_id',
|
||||
'nome',
|
||||
'versao',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
|
||||
public function empresa()
|
||||
{
|
||||
return $this->belongsTo(Empresa::class);
|
||||
}
|
||||
|
||||
public function ramoAtividade()
|
||||
{
|
||||
return $this->belongsTo(RamoAtividade::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user