Carga inicial

This commit is contained in:
IvanAS94
2025-12-26 17:21:11 -08:00
parent 45d9afc951
commit 51880798ca
359 changed files with 42159 additions and 1 deletions

View File

@@ -0,0 +1,71 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class BitacoraLaboral extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'bitacora_laboral';
/**
* The table primary key.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'usuario_id', 'vehiculo_id', 'fecha_hora_ini', 'fecha_hora_fin', 'kilometraje_inicial', 'kilometraje_final', 'lat_ini', 'lng_ini', 'lat_fin', 'lng_fin'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
//
];
}

View File

@@ -0,0 +1,74 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class CatEstatuServicio extends Model
{
use SoftDeletes;
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'cat_estatus_servicios';
/**
* The table primary key.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'nombre', 'color_1', 'color_2'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
//
];
}

View File

@@ -0,0 +1,72 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class CatFormaPago extends Model
{
use SoftDeletes;
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'cat_formas_pagos';
/**
* The table primary key.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'nombre', 'zeros'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
//
];
}

View File

@@ -0,0 +1,73 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class CatMotivoEstatus extends Model
{
use SoftDeletes;
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'cat_motivos_estatus';
/**
* The table primary key.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'nombre'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
//
];
}

74
app/Models/CatOrigen.php Normal file
View File

@@ -0,0 +1,74 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class CatOrigen extends Model
{
use SoftDeletes;
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'cat_origenes';
/**
* The table primary key.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'nombre'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
//
];
}

View File

@@ -0,0 +1,74 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class CatServicio extends Model
{
use SoftDeletes;
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'cat_servicios';
/**
* The table primary key.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'nombre'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
//
];
}

View File

@@ -0,0 +1,74 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class CatTipoServicio extends Model
{
use SoftDeletes;
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'cat_tipos_servicios';
/**
* The table primary key.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'nombre'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
//
];
}

86
app/Models/Cliente.php Normal file
View File

@@ -0,0 +1,86 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Cliente extends Model
{
use SoftDeletes;
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'clientes';
/**
* The table primary key.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'denominacion', 'asesor_id', 'requiere_factura', 'sucursal_id', 'email'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
//
];
public function registroDomicilios(){
return $this->hasMany('App\Models\ClienteDomicilio', 'cliente_id');
}
public function registroDatosFiscales(){
return $this->hasMany('App\Models\ClienteDatoFiscal', 'cliente_id');
}
}

View File

@@ -0,0 +1,71 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class ClienteDatoFiscal extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'clientes_datos_fiscales';
/**
* The table primary key.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'cliente_id', 'razon_social', 'rfc', 'email', 'calle', 'num_ext', 'num_int', 'colonia', 'localidad', 'municipio', 'estado', 'pais', 'cp', 'factura_uso_cfdi_id', 'factura_tipo_comprobante_id', 'factura_metodos_pago_id', 'factura_formas_pago_id', 'condicion_pago', 'retencion_iva', 'observacion'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
//
];
}

View File

@@ -0,0 +1,76 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class ClienteDomicilio extends Model
{
use SoftDeletes;
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'clientes_domicilios';
/**
* The table primary key.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'cliente_id', 'nombre_sucursal', 'numero_sucursal', 'nombre_responsable_sucursal', 'calle', 'entre_calles', 'num_ext', 'num_int', 'colonia', 'ciudad', 'cp', 'telefono', 'celular_responsable', 'lat', 'lng', 'email', 'nombre_croquis'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
//
];
}

View File

@@ -0,0 +1,72 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class CorreoSucursal extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'correos_sucursales';
/**
* The table primary key.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'email', 'sucursal_id'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
//
];
}

View File

@@ -0,0 +1,71 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class FacturaFormaPago extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'facturas_formas_pago';
/**
* The table primary key.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'clave', 'descripcion'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
//
];
}

View File

@@ -0,0 +1,71 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class FacturaMetodoPago extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'facturas_metodos_pago';
/**
* The table primary key.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'clave', 'descripcion'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
//
];
}

View File

@@ -0,0 +1,71 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class FacturaTipoComprobante extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'facturas_tipo_comprobante';
/**
* The table primary key.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'clave', 'descripcion'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
//
];
}

View File

@@ -0,0 +1,71 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class FacturaUsoCFDI extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'facturas_uso_cfdi';
/**
* The table primary key.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'clave', 'descripcion'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
//
];
}

69
app/Models/Parametro.php Normal file
View File

@@ -0,0 +1,69 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Parametro extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'parametros';
/**
* The table primary key.
*
* @var string
*/
//protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = false;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = false;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'llave', 'valor'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [];
}

View File

@@ -0,0 +1,74 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class PreguntaDomestico extends Model
{
use SoftDeletes;
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'preguntas_domestico';
/**
* The table primary key.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
//
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'created_at', 'updated_at', 'deleted_at'
];
}

View File

@@ -0,0 +1,74 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class PreguntaEmpresarial extends Model
{
use SoftDeletes;
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'preguntas_empresarial';
/**
* The table primary key.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
//
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
//
];
}

View File

@@ -0,0 +1,74 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class RespuestaDomestico extends Model
{
use SoftDeletes;
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'respuestas_domestico';
/**
* The table primary key.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
//
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'created_at', 'updated_at', 'deleted_at'
];
}

View File

@@ -0,0 +1,74 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class RespuestaEmpresarial extends Model
{
use SoftDeletes;
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'respuestas_empresarial';
/**
* The table primary key.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
//
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
//
];
}

View File

@@ -0,0 +1,71 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class RespuestaOperadorDet extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'respuestas_operador_det';
/**
* The table primary key.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'respuestas_operador_enc_id', 'nombre', 'tipo', 'tipo_checkbox', 'tipo_text', 'tipo_radio_btn', 'respuesta_checkbox', 'respuesta_text', 'respuesta_radio_btn'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
//
];
}

View File

@@ -0,0 +1,71 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class RespuestaOperadorEnc extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'respuestas_operador_enc';
/**
* The table primary key.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'user_id', 'fecha'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
//
];
}

72
app/Models/Rol.php Normal file
View File

@@ -0,0 +1,72 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Rol extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'roles';
/**
* The table primary key.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'slug', 'name', 'permissions', 'movil', 'web'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [];
}

72
app/Models/RolUser.php Normal file
View File

@@ -0,0 +1,72 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class RolUser extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'role_users';
/**
* The table primary key.
*
* @var string
*/
//protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'user_id', 'role_id'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [];
}

109
app/Models/ServicioDet.php Normal file
View File

@@ -0,0 +1,109 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class ServicioDet extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'servicios_det';
/**
* The table primary key.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'servicio_enc_id', 'servicio_id', 'estatus_servicio_id', 'tipo_servicio_id', 'fecha_solicitud', 'duracion', 'definido_cliente', 'operador_id', 'vehiculo_id', 'auxiliar_1', 'auxiliar_2', 'costo_servicio', 'aceptado', 'observacion', 'observacion_atencion_cliente', 'requiere_encuesta','facturado', 'cat_motivos_estatus_id'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
//
];
public function scopeJoinDetalleServicio($query)
{
return $query->join('cat_servicios', 'cat_servicios.id', '=', 'servicios.servicio_id')
->join('cat_estatus_servicios', 'cat_estatus_servicios.id', '=', 'servicios.estatus_servicio_id')
->join('cat_formas_pagos', 'cat_formas_pagos.id', '=', 'servicios.forma_pago_id')
->join('cat_tipos_servicios', 'cat_tipos_servicios.id', '=', 'servicios.tipo_servicio_id')
->join('users', 'users.id', '=', 'servicios.usuario_agenda_id')
->join('clientes', 'clientes.id', '=', 'servicios.cliente_id')
->join('clientes_domicilios', 'clientes_domicilios.id', '=', 'servicios.cliente_domicilio_id')
->leftJoin('users as operador', 'operador.id', '=', 'servicios.operador_id')
->leftJoin('cat_vehiculos', 'cat_vehiculos.id', '=', 'servicios.vehiculo_id');
}
public function scopeJoinDetalleServicioDet($query)
{
return $query->join('cat_servicios', 'cat_servicios.id', '=', 'servicios_det.servicio_id')
->join('cat_estatus_servicios', 'cat_estatus_servicios.id', '=', 'servicios_det.estatus_servicio_id')
->join('cat_tipos_servicios', 'cat_tipos_servicios.id', '=', 'servicios_det.tipo_servicio_id')
->leftJoin('users as operador', 'operador.id', '=', 'servicios_det.operador_id')
->leftJoin('cat_vehiculos', 'cat_vehiculos.id', '=', 'servicios_det.vehiculo_id')
->leftJoin('vehiculos_sucursales', 'vehiculos_sucursales.vehiculo_id', '=', 'servicios_det.vehiculo_id')
->leftJoin('sucursales', 'sucursales.id', '=', 'vehiculos_sucursales.sucursal_id')
->leftJoin('sucursales as sucursal_operador', 'sucursal_operador.id', '=', 'operador.sucursal_id')
->leftJoin('users as auxiliares_1', 'auxiliares_1.id', '=', 'servicios_det.auxiliar_1')
->leftJoin('sucursales as sucursal_auxiliares_1', 'sucursal_auxiliares_1.id', '=', 'auxiliares_1.sucursal_id')
->leftJoin('users as auxiliares_2', 'auxiliares_2.id', '=', 'servicios_det.auxiliar_2')
->leftJoin('sucursales as sucursal_auxiliares_2', 'sucursal_auxiliares_2.id', '=', 'auxiliares_2.sucursal_id');
}
public function scopeJoinDetalleServicioDetMovil($query)
{
return $query->join('servicios_enc', 'servicios_enc.id', '=', 'servicios_det.servicio_enc_id')
->join('cat_formas_pagos', 'cat_formas_pagos.id', '=', 'servicios_enc.forma_pago_id')
->join('users', 'users.id', '=', 'servicios_enc.usuario_agenda_id')
->join('clientes', 'clientes.id', '=', 'servicios_enc.cliente_id')
->join('clientes_domicilios', 'clientes_domicilios.id', '=', 'servicios_enc.cliente_domicilio_id');
}
}

View File

@@ -0,0 +1,87 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class ServicioEnc extends Model
{
use SoftDeletes;
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'servicios_enc';
/**
* The table primary key.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'forma_pago_id', 'fecha_agenda', 'usuario_agenda_id', 'cliente_id', 'cliente_domicilio_id', 'sucursal_id', 'origen_id'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
//
];
public function scopeJoinDetalleServicioEnc($query)
{
return $query->join('cat_formas_pagos', 'cat_formas_pagos.id', '=', 'servicios_enc.forma_pago_id')
->join('users', 'users.id', '=', 'servicios_enc.usuario_agenda_id')
->join('clientes', 'clientes.id', '=', 'servicios_enc.cliente_id')
->join('clientes_domicilios', 'clientes_domicilios.id', '=', 'servicios_enc.cliente_domicilio_id');
}
public function servicios()
{
return $this->hasMany('App\Models\ServicioDet', 'servicio_enc_id');
}
}

View File

@@ -0,0 +1,74 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class ServicioEncuestaDomestico extends Model
{
use SoftDeletes;
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'servicios_encuestas_domestico';
/**
* The table primary key.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'servicio_det_id', 'pregunta_id', 'respuesta_id', 'respuesta'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
//
];
}

View File

@@ -0,0 +1,74 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class ServicioEncuestaEmpresarial extends Model
{
use SoftDeletes;
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'servicios_encuestas_empresarial';
/**
* The table primary key.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'servicio_det_id', 'pregunta_id', 'respuesta_id', 'respuesta'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
//
];
}

View File

@@ -0,0 +1,71 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class ServicioEvidencia extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'servicios_evidencias';
/**
* The table primary key.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'servicio_progreso_id', 'imagen', 'uuid', 'etapa', 'lat', 'lng'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
//
];
}

View File

@@ -0,0 +1,71 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class ServicioProgreso extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'servicios_progreso';
/**
* The table primary key.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'servicio_enc_id', 'servicio_det_id', 'fecha_ini_servidor', 'fecha_fin_servidor', 'fecha_ini_celular', 'fecha_fin_celular', 'duracion', 'lat_ini', 'lng_ini', 'lat_fin', 'lng_fin', 'comentarios', 'firma', 'pdf', 'aplica_garantia','litraje','encuesta_contestada'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
//
];
}

74
app/Models/Sucursal.php Normal file
View File

@@ -0,0 +1,74 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Sucursal extends Model
{
use SoftDeletes;
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'sucursales';
/**
* The table primary key.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'nombre', 'calle', 'num_ext', 'num_int', 'colonia', 'cp', 'telefono', 'gerente', 'encargado'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
//
];
}

View File

@@ -0,0 +1,71 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class TipoEmpleado extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'tipos_empleados';
/**
* The table primary key.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'nombre'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
//
];
}

View File

@@ -0,0 +1,74 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class TipoVehiculo extends Model
{
use SoftDeletes;
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'cat_tipos_vehiculos';
/**
* The table primary key.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'nombre', 'objetivo_mensual'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
//
];
}

37
app/Models/User.php Normal file
View File

@@ -0,0 +1,37 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Tymon\JWTAuth\Contracts\JWTSubject;
class User extends Authenticatable
{
use SoftDeletes;
use Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'nombre', 'email', 'password','apellido_materno','apellido_paterno','telefono', 'tipo_empleado_id', 'sucursal_id', 'token_firebase'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'password', 'remember_token',
];
public function desplazamientos()
{
return $this->hasMany('App\Models\UsuarioDesplazamiento', 'usuario_id');
}
}

View File

@@ -0,0 +1,71 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class UserLoginLog extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'users_logins_logs';
/**
* The table primary key.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'user_id', 'device_info', 'browser_info', 'ip', 'request_uri'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
//
];
}

View File

@@ -0,0 +1,71 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class UsuarioDesplazamiento extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'usuarios_desplazamientos';
/**
* The table primary key.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'bitacora_laboral_id', 'usuario_id', 'fecha', 'modelo_celular', 'bateria', 'lat', 'lng'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
//
];
}

74
app/Models/Vehiculo.php Normal file
View File

@@ -0,0 +1,74 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Vehiculo extends Model
{
use SoftDeletes;
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'cat_vehiculos';
/**
* The table primary key.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'num_economico', 'descripcion', 'tipo_vehiculo_id'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
//
];
}

View File

@@ -0,0 +1,74 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class VehiculoIncidencia extends Model
{
use SoftDeletes;
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'vehiculos_incidencias';
/**
* The table primary key.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'vehiculo_id', 'user_id','descripcion', 'resuelta',
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
//
];
}

View File

@@ -0,0 +1,71 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class VehiculoSucursal extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'vehiculos_sucursales';
/**
* The table primary key.
*
* @var string
*/
//protected $primaryKey = 'id';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [];
/**
* Indicates if the primary key is autoincrement.
*
* @var bool
*/
public $incrementing = false;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = false;
/**
* The attributes that should be filleable for arrays.
*
* @var array
*
* $guarded = [] or $filleable = []
*/
protected $guarded = [];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'vehiculo_id', 'sucursal_id'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
//
];
}