Carga inicial
This commit is contained in:
82
database/seeds/CatFacturacion.php
Normal file
82
database/seeds/CatFacturacion.php
Normal file
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class CatFacturacion extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('facturas_formas_pago')->insert([
|
||||
[
|
||||
'clave' => '01',
|
||||
'descripcion' => 'Efectivo',
|
||||
],
|
||||
[
|
||||
'clave' => '02',
|
||||
'descripcion' => 'Cheque nominativo',
|
||||
],
|
||||
[
|
||||
'clave' => '03',
|
||||
'descripcion' => 'Transferencia electrónica de fondos',
|
||||
],
|
||||
[
|
||||
'clave' => '04',
|
||||
'descripcion' => 'Tarjeta de crédito',
|
||||
],
|
||||
[
|
||||
'clave' => '14',
|
||||
'descripcion' => 'Pago por consignación',
|
||||
],
|
||||
[
|
||||
'clave' => '28',
|
||||
'descripcion' => 'Tarjeta de débito',
|
||||
],
|
||||
[
|
||||
'clave' => '30',
|
||||
'descripcion' => 'Aplicación de anticipos',
|
||||
],
|
||||
[
|
||||
'clave' => '99',
|
||||
'descripcion' => 'Por definir',
|
||||
],
|
||||
]);
|
||||
|
||||
DB::table('facturas_metodos_pago')->insert([
|
||||
[
|
||||
'clave' => 'PUE',
|
||||
'descripcion' => 'Pago en una sola exhibición',
|
||||
],
|
||||
[
|
||||
'clave' => 'PPD',
|
||||
'descripcion' => 'Pago en parcialidades o diferido',
|
||||
],
|
||||
]);
|
||||
|
||||
DB::table('facturas_tipo_comprobante')->insert([
|
||||
[
|
||||
'clave' => 'I',
|
||||
'descripcion' => 'Ingreso',
|
||||
],
|
||||
]);
|
||||
|
||||
DB::table('facturas_uso_cfdi')->insert([
|
||||
[
|
||||
'clave' => 'G01',
|
||||
'descripcion' => 'Adquisición de mercancias',
|
||||
],
|
||||
[
|
||||
'clave' => 'G03',
|
||||
'descripcion' => 'Gastos en general',
|
||||
],
|
||||
[
|
||||
'clave' => 'P01',
|
||||
'descripcion' => 'Por definir',
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
38
database/seeds/CatMotivosEstatusSeeder.php
Normal file
38
database/seeds/CatMotivosEstatusSeeder.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class CatMotivosEstatusSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('cat_motivos_estatus')->insert([
|
||||
[
|
||||
'nombre' => 'Nivel en calle / Pozos de visita llenos',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString()
|
||||
],
|
||||
[
|
||||
'nombre' => 'Tubería dañada',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString()
|
||||
],
|
||||
[
|
||||
'nombre' => 'Registros ocultos',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString()
|
||||
],
|
||||
[
|
||||
'nombre' => 'Registro sellado',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString()
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
||||
58
database/seeds/CatMotivosEstatusUpdateSeeder.php
Normal file
58
database/seeds/CatMotivosEstatusUpdateSeeder.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class CatMotivosEstatusUpdateSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('cat_motivos_estatus')->insert([
|
||||
[
|
||||
'nombre' => 'Cliente canceló',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString()
|
||||
],
|
||||
[
|
||||
'nombre' => 'Cliente no se encuentra',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString()
|
||||
],
|
||||
[
|
||||
'nombre' => 'Cliente resolvió',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString()
|
||||
],
|
||||
[
|
||||
'nombre' => 'Negocio cerrado',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString()
|
||||
],
|
||||
[
|
||||
'nombre' => 'Cliente reprogramó',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString()
|
||||
],
|
||||
[
|
||||
'nombre' => 'Tubería con raíces',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString()
|
||||
],
|
||||
[
|
||||
'nombre' => 'Requiere succión',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString()
|
||||
],
|
||||
[
|
||||
'nombre' => 'Domicilio no localizado',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString()
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
||||
69
database/seeds/CatOrigenesTableSeeder.php
Normal file
69
database/seeds/CatOrigenesTableSeeder.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class CatOrigenesTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('cat_origenes')->insert([
|
||||
|
||||
[
|
||||
'nombre' => 'Llamada Telefónica',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Correo electrónico',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Punto de venta',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Recomendación',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Internet',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Sección amarilla',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Publicidad visual',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Plomero',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Sitio web',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'JAPAC',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
||||
73
database/seeds/ClientesTableSeeder.php
Normal file
73
database/seeds/ClientesTableSeeder.php
Normal file
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class ClientesTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run(Faker\Generator $faker)
|
||||
{
|
||||
|
||||
for ($i = 1; $i <= 50; $i++){
|
||||
|
||||
$data_cliente = [
|
||||
'denominacion' => $faker->company,
|
||||
'asesor_id' => $faker->numberBetween(4,5),
|
||||
'requiere_factura' => 1,
|
||||
'sucursal_id' => $faker->numberBetween(1,2)
|
||||
];
|
||||
|
||||
$cliente = \App\Models\Cliente::create($data_cliente);
|
||||
|
||||
$data_cliente_domicilio = [
|
||||
'cliente_id' => $cliente->id,
|
||||
'nombre_sucursal' => $faker->company,
|
||||
'numero_sucursal' => $faker->numberBetween(1,100),
|
||||
'nombre_responsable_sucursal' => $faker->firstNameFemale.' '.$faker->lastName,
|
||||
'calle' => $faker->streetName,
|
||||
'entre_calles' => $faker->streetName.' and '.$faker->streetName,
|
||||
'num_ext' => $faker->numberBetween(1000,5000),
|
||||
'num_int' => $faker->numberBetween(1000,5000),
|
||||
'colonia' => $faker->cityPrefix,
|
||||
'ciudad' => $faker->city,
|
||||
'cp' => $faker->postcode,
|
||||
'telefono' => $faker->bothify('667#######'),
|
||||
'celular_responsable' => $faker->bothify('667#######'),
|
||||
'lat' => $faker->latitude($min = 21, $max = 26),
|
||||
'lng' => $faker->longitude($min = -101, $max = -106)
|
||||
];
|
||||
|
||||
\App\Models\ClienteDomicilio::create($data_cliente_domicilio);
|
||||
|
||||
$data_cliente_datos_fiscales = [
|
||||
'cliente_id' => $cliente->id,
|
||||
'razon_social' => $faker->catchPhrase,
|
||||
'rfc' => $faker->isbn13,
|
||||
'email' => $faker->freeEmail,
|
||||
'calle' => $faker->streetName,
|
||||
'num_ext' => $faker->numberBetween(1000,5000),
|
||||
'num_int' => $faker->numberBetween(1000,5000),
|
||||
'colonia' => $faker->cityPrefix,
|
||||
'localidad' => $faker->cityPrefix,
|
||||
'municipio' => $faker->country,
|
||||
'estado' => $faker->state,
|
||||
'pais' => $faker->city,
|
||||
'cp' => $faker->postcode,
|
||||
'factura_uso_cfdi_id' => $faker->numberBetween(1,3),
|
||||
'factura_tipo_comprobante_id' => 1,
|
||||
'factura_metodos_pago_id' => $faker->numberBetween(1,2),
|
||||
'factura_formas_pago_id' => $faker->numberBetween(1,8),
|
||||
'condicion_pago' => $faker->sentence($nbWords = 2, $variableNbWords = true),
|
||||
'retencion_iva' => $faker->numberBetween(0,1),
|
||||
'observacion' => $faker->sentence($nbWords = 10, $variableNbWords = true),
|
||||
];
|
||||
|
||||
\App\Models\ClienteDatoFiscal::create($data_cliente_datos_fiscales);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
31
database/seeds/ColoresWebEstatusServicio.php
Normal file
31
database/seeds/ColoresWebEstatusServicio.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class ColoresWebEstatusServicio extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$estatus = \App\Models\CatEstatuServicio::all();
|
||||
foreach ($estatus as $e){
|
||||
\App\Models\CatEstatuServicio::where('id', $e->id)->update(['color_web' => $this->colores()[$e->id]]);
|
||||
}
|
||||
}
|
||||
|
||||
function colores(){
|
||||
return [
|
||||
1 => "#5BB55B",
|
||||
2 => "#FFBF80",
|
||||
3 => "#B55B5B",
|
||||
4 => "#FDF1BA",
|
||||
5 => "#FC7E7E",
|
||||
6 => "#8080FF",
|
||||
7 => "#A3A3A3",
|
||||
];
|
||||
}
|
||||
}
|
||||
54
database/seeds/CorreosSucursalesTableSeeder.php
Normal file
54
database/seeds/CorreosSucursalesTableSeeder.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class CorreosSucursalesTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('correos_sucursales')->insert([
|
||||
[
|
||||
'email' => 'guillermo@drenax.com.mx',
|
||||
'sucursal_id' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'email' => 'bladimir@drenax.com.mx',
|
||||
'sucursal_id' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'email' => 'supervisorcln@drenax.com.mx',
|
||||
'sucursal_id' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'email' => 'sergio@drenax.com.mx',
|
||||
'sucursal_id' => 2,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'email' => 'gerencialosmochis@drenax.com.mx',
|
||||
'sucursal_id' => 2,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'email' => 'marcela@drenax.com.mx',
|
||||
'sucursal_id' => 3,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
||||
40
database/seeds/DatabaseSeeder.php
Normal file
40
database/seeds/DatabaseSeeder.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$this->call(TiposServiciosTableSeeder::class);
|
||||
$this->call(ServiciosTableSeeder::class);
|
||||
$this->call(FormasPagosTableSeeder::class);
|
||||
$this->call(EstatusServiciosTableSeeder::class);
|
||||
$this->call(TiposVehiculosTableSeeder::class);
|
||||
$this->call(VehiculosTableSeeder::class);
|
||||
$this->call(TiposEmpleadosTableSeeder::class);
|
||||
$this->call(SucursalesTableSeeder::class);
|
||||
$this->call(RolesTableSeeder::class);
|
||||
$this->call(UsersTableSeeder::class);
|
||||
$this->call(CatFacturacion::class);
|
||||
//$this->call(ClientesTableSeeder::class);
|
||||
//$this->call(SolicitudesServicioTableSeeder::class);
|
||||
$this->call(ParametrosTableSeeder::class);
|
||||
$this->call(VehiculosSucursalesTableSeeder::class);
|
||||
$this->call(CatOrigenesTableSeeder::class);
|
||||
|
||||
$this->call(PreguntasEmpresarialTableSeeder::class);
|
||||
$this->call(RespuestasEmpresarialTableSeeder::class);
|
||||
|
||||
$this->call(PreguntasDomesticoTableSeeder::class);
|
||||
$this->call(RespuestasDomesticoTableSeeder::class);
|
||||
|
||||
$this->call(PreguntasRespuestasNuevasTableSeeder::class);
|
||||
$this->call(ColoresWebEstatusServicio::class);
|
||||
}
|
||||
}
|
||||
68
database/seeds/EstatusServiciosTableSeeder.php
Normal file
68
database/seeds/EstatusServiciosTableSeeder.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class EstatusServiciosTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('cat_estatus_servicios')->insert([
|
||||
|
||||
[
|
||||
'nombre' => 'Realizado',
|
||||
'color_1' => '#04B404',
|
||||
'color_2' => NULL,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Reprogramado',
|
||||
'color_1' => '#FF8000',
|
||||
'color_2' => NULL,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Cancelado',
|
||||
'color_1' => '#B40404',
|
||||
'color_2' => NULL,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Pendiente',
|
||||
'color_1' => '#FFFF00',
|
||||
'color_2' => '#000000',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Negativo',
|
||||
'color_1' => '#FE2E2E',
|
||||
'color_2' => '#FFFFFF',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Pagado',
|
||||
'color_1' => '#0000FF',
|
||||
'color_2' => NULL,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Visita/asesoría',
|
||||
'color_1' => '#A4A4A4',
|
||||
'color_2' => NULL,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
49
database/seeds/FormasPagosTableSeeder.php
Normal file
49
database/seeds/FormasPagosTableSeeder.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class FormasPagosTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('cat_formas_pagos')->insert([
|
||||
|
||||
[
|
||||
'nombre' => 'Efectivo',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Garantía',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Terminal',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Cotización',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Transferencia',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Cheque',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
29
database/seeds/ParametrosTableSeeder.php
Normal file
29
database/seeds/ParametrosTableSeeder.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class ParametrosTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('parametros')->insert([
|
||||
[
|
||||
'llave' => 'INTERVALO_GEOLOCALIZACION_OPERADOR_MINUTOS',
|
||||
'valor' => '3',
|
||||
],
|
||||
[
|
||||
'llave' => 'ANCLAJE_SERVICIO_HORAS',
|
||||
'valor' => '3',
|
||||
],
|
||||
[
|
||||
'llave' => 'CURRENT_VERSION_APPLICATION',
|
||||
'valor' => '0.40',
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
||||
95
database/seeds/PreguntasDomesticoTableSeeder.php
Normal file
95
database/seeds/PreguntasDomesticoTableSeeder.php
Normal file
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class PreguntasDomesticoTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('preguntas_domestico')->insert([
|
||||
[
|
||||
'nombre' => '¿El personal se presentó y mostró la orden de trabajo previo a la realización de su servicio?',
|
||||
'orden' => 1,
|
||||
'mostrar_numero' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => '¿Cómo califica la puntualidad de nuestro personal?',
|
||||
'orden' => 2,
|
||||
'mostrar_numero' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => '¿Cómo califica la imagen de nuestro personal?',
|
||||
'orden' => 3,
|
||||
'mostrar_numero' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => '¿El asesor usó los instrumentos de seguridad e higiene para la correcta ejecución del servicio?',
|
||||
'orden' => 4,
|
||||
'mostrar_numero' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => '¿Cómo califica la atención y asesoría brindada por los asesores?',
|
||||
'orden' => 5,
|
||||
'mostrar_numero' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => '¿El servicio fue efectivo quedando conforme con lo que contrató?',
|
||||
'orden' => 6,
|
||||
'mostrar_numero' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => '¿Cómo califica la atención y asesoría telefónica?',
|
||||
'orden' => 7,
|
||||
'mostrar_numero' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'De acuerdo al servicio recibido, ¿usted nos recomendaría?',
|
||||
'orden' => 8,
|
||||
'mostrar_numero' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => '¿Cuánto pagó por su servicio?',
|
||||
'orden' => 9,
|
||||
'mostrar_numero' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Correo:',
|
||||
'orden' => 10,
|
||||
'mostrar_numero' => 0,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Fecha de nacimiento:',
|
||||
'orden' => 11,
|
||||
'mostrar_numero' => 0,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
102
database/seeds/PreguntasEmpresarialTableSeeder.php
Normal file
102
database/seeds/PreguntasEmpresarialTableSeeder.php
Normal file
@@ -0,0 +1,102 @@
|
||||
<?php
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class PreguntasEmpresarialTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('preguntas_empresarial')->insert([
|
||||
[
|
||||
'nombre' => '¿Su servicio fue programado en tiempo y forma?',
|
||||
'orden' => 1,
|
||||
'mostrar_numero' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => '¿El asesor de operaciones realiza recibo de servicio, y es llenado correctamente hora de inicio y hora final?',
|
||||
'orden' => 2,
|
||||
'mostrar_numero' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => '¿Cómo califica la imagen del personal?',
|
||||
'orden' => 3,
|
||||
'mostrar_numero' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => '¿El asesor usó los instrumentos de seguridad e higiene para la correcta ejecución del servicio?',
|
||||
'orden' => 4,
|
||||
'mostrar_numero' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => '¿Cómo califica la atención y asesoría brindada por los asesores de operaciones?',
|
||||
'orden' => 5,
|
||||
'mostrar_numero' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => '¿Cómo califica la calidad del servicio contratado?',
|
||||
'orden' => 6,
|
||||
'mostrar_numero' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => '¿Cómo califica la atención y asesoría telefónica?',
|
||||
'orden' => 7,
|
||||
'mostrar_numero' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => '¿Recibió su factura del mes en tiempo y forma?',
|
||||
'orden' => 8,
|
||||
'mostrar_numero' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => '¿Cómo califica nuestra área de cobranza?',
|
||||
'orden' => 9,
|
||||
'mostrar_numero' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => '¿Cómo califica en general a la empresa DRENAX?',
|
||||
'orden' => 10,
|
||||
'mostrar_numero' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Correo:',
|
||||
'orden' => 11,
|
||||
'mostrar_numero' => 0,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Fecha de nacimiento:',
|
||||
'orden' => 12,
|
||||
'mostrar_numero' => 0,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
69
database/seeds/PreguntasRespuestasNuevasTableSeeder.php
Normal file
69
database/seeds/PreguntasRespuestasNuevasTableSeeder.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class PreguntasRespuestasNuevasTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('preguntas_domestico')->insert([
|
||||
[
|
||||
'nombre' => 'Comentarios:',
|
||||
'orden' => 12,
|
||||
'mostrar_numero' => 0,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
]
|
||||
]);
|
||||
|
||||
DB::table('preguntas_empresarial')->insert([
|
||||
[
|
||||
'nombre' => 'Comentarios:',
|
||||
'orden' => 13,
|
||||
'mostrar_numero' => 0,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
]
|
||||
]);
|
||||
|
||||
DB::table('respuestas_domestico')->insert([
|
||||
|
||||
//Respuesta 12
|
||||
[
|
||||
'nombre' => '',
|
||||
'pregunta_id' => 12,
|
||||
'orden' => 1,
|
||||
'tipo_campo' => 'Texto',
|
||||
'puntuacion' => null,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
]);
|
||||
|
||||
DB::table('respuestas_empresarial')->insert([
|
||||
|
||||
//Respuesta 13
|
||||
[
|
||||
'nombre' => '',
|
||||
'pregunta_id' => 13,
|
||||
'orden' => 1,
|
||||
'tipo_campo' => 'Texto',
|
||||
'puntuacion' => null,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
]);
|
||||
|
||||
\App\Models\RespuestaDomestico::where('pregunta_id',1)->delete();
|
||||
\App\Models\PreguntaDomestico::where('id',1)->delete();
|
||||
|
||||
\App\Models\RespuestaEmpresarial::where('pregunta_id',2)->delete();
|
||||
\App\Models\PreguntaEmpresarial::where('id',2)->delete();
|
||||
}
|
||||
}
|
||||
319
database/seeds/RespuestasDomesticoTableSeeder.php
Normal file
319
database/seeds/RespuestasDomesticoTableSeeder.php
Normal file
@@ -0,0 +1,319 @@
|
||||
<?php
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class RespuestasDomesticoTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('respuestas_domestico')->insert([
|
||||
|
||||
//Respuesta 1
|
||||
[
|
||||
'nombre' => 'Si',
|
||||
'pregunta_id' => 1,
|
||||
'orden' => 1,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 100,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'No',
|
||||
'pregunta_id' => 1,
|
||||
'orden' => 2,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 50,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
|
||||
//Respuesta 2
|
||||
[
|
||||
'nombre' => 'Excelente',
|
||||
'pregunta_id' => 2,
|
||||
'orden' => 1,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 100,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Bueno',
|
||||
'pregunta_id' => 2,
|
||||
'orden' => 2,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 80,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Regular',
|
||||
'pregunta_id' => 2,
|
||||
'orden' => 3,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 60,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Malo',
|
||||
'pregunta_id' => 2,
|
||||
'orden' => 4,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 40,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Pésimo',
|
||||
'pregunta_id' => 2,
|
||||
'orden' => 5,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 20,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
|
||||
//Respuesta 3
|
||||
[
|
||||
'nombre' => 'Excelente',
|
||||
'pregunta_id' => 3,
|
||||
'orden' => 1,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 100,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Bueno',
|
||||
'pregunta_id' => 3,
|
||||
'orden' => 2,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 80,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Regular',
|
||||
'pregunta_id' => 3,
|
||||
'orden' => 3,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 60,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Malo',
|
||||
'pregunta_id' => 3,
|
||||
'orden' => 4,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 40,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Pésimo',
|
||||
'pregunta_id' => 3,
|
||||
'orden' => 5,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 20,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
|
||||
//Respuesta 4
|
||||
[
|
||||
'nombre' => 'Si',
|
||||
'pregunta_id' => 4,
|
||||
'orden' => 1,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 100,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'No',
|
||||
'pregunta_id' => 4,
|
||||
'orden' => 2,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 50,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
|
||||
//Respuesta 5
|
||||
[
|
||||
'nombre' => 'Excelente',
|
||||
'pregunta_id' => 5,
|
||||
'orden' => 1,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 100,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Bueno',
|
||||
'pregunta_id' => 5,
|
||||
'orden' => 2,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 80,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Regular',
|
||||
'pregunta_id' => 5,
|
||||
'orden' => 3,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 60,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Malo',
|
||||
'pregunta_id' => 5,
|
||||
'orden' => 4,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 40,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Pésimo',
|
||||
'pregunta_id' => 5,
|
||||
'orden' => 5,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 20,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
|
||||
//Respuesta 6
|
||||
[
|
||||
'nombre' => 'Si',
|
||||
'pregunta_id' => 6,
|
||||
'orden' => 1,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 100,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'No',
|
||||
'pregunta_id' => 6,
|
||||
'orden' => 2,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 50,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
|
||||
//Respuesta 7
|
||||
[
|
||||
'nombre' => 'Excelente',
|
||||
'pregunta_id' => 7,
|
||||
'orden' => 1,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 100,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Bueno',
|
||||
'pregunta_id' => 7,
|
||||
'orden' => 2,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 80,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Regular',
|
||||
'pregunta_id' => 7,
|
||||
'orden' => 3,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 60,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Malo',
|
||||
'pregunta_id' => 7,
|
||||
'orden' => 4,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 40,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Pésimo',
|
||||
'pregunta_id' => 7,
|
||||
'orden' => 5,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 20,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
|
||||
//Respuesta 8
|
||||
[
|
||||
'nombre' => 'Si',
|
||||
'pregunta_id' => 8,
|
||||
'orden' => 1,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 100,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'No',
|
||||
'pregunta_id' => 8,
|
||||
'orden' => 2,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 50,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
|
||||
//Respuesta 9
|
||||
[
|
||||
'nombre' => '',
|
||||
'pregunta_id' => 9,
|
||||
'orden' => 1,
|
||||
'tipo_campo' => 'Moneda',
|
||||
'puntuacion' => null,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
|
||||
//Respuesta 10
|
||||
[
|
||||
'nombre' => '',
|
||||
'pregunta_id' => 10,
|
||||
'orden' => 1,
|
||||
'tipo_campo' => 'Email',
|
||||
'puntuacion' => null,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
|
||||
//Respuesta 11
|
||||
[
|
||||
'nombre' => '',
|
||||
'pregunta_id' => 11,
|
||||
'orden' => 1,
|
||||
'tipo_campo' => 'Fecha',
|
||||
'puntuacion' => null,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
402
database/seeds/RespuestasEmpresarialTableSeeder.php
Normal file
402
database/seeds/RespuestasEmpresarialTableSeeder.php
Normal file
@@ -0,0 +1,402 @@
|
||||
<?php
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class RespuestasEmpresarialTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('respuestas_empresarial')->insert([
|
||||
|
||||
//Respuesta 1
|
||||
[
|
||||
'nombre' => 'Si',
|
||||
'pregunta_id' => 1,
|
||||
'orden' => 1,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 100,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'No',
|
||||
'pregunta_id' => 1,
|
||||
'orden' => 2,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 50,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
|
||||
//Respuesta 2
|
||||
[
|
||||
'nombre' => 'Si',
|
||||
'pregunta_id' => 2,
|
||||
'orden' => 1,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 100,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'No',
|
||||
'pregunta_id' => 2,
|
||||
'orden' => 2,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 50,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
|
||||
//Respuesta 3
|
||||
[
|
||||
'nombre' => 'Excelente',
|
||||
'pregunta_id' => 3,
|
||||
'orden' => 1,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 100,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Bueno',
|
||||
'pregunta_id' => 3,
|
||||
'orden' => 2,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 80,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Regular',
|
||||
'pregunta_id' => 3,
|
||||
'orden' => 3,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 60,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Malo',
|
||||
'pregunta_id' => 3,
|
||||
'orden' => 4,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 40,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Pésimo',
|
||||
'pregunta_id' => 3,
|
||||
'orden' => 5,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 20,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
|
||||
//Respuesta 4
|
||||
[
|
||||
'nombre' => 'Si',
|
||||
'pregunta_id' => 4,
|
||||
'orden' => 1,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 100,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'No',
|
||||
'pregunta_id' => 4,
|
||||
'orden' => 2,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 50,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
|
||||
//Respuesta 5
|
||||
[
|
||||
'nombre' => 'Excelente',
|
||||
'pregunta_id' => 5,
|
||||
'orden' => 1,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 100,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Bueno',
|
||||
'pregunta_id' => 5,
|
||||
'orden' => 2,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 80,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Regular',
|
||||
'pregunta_id' => 5,
|
||||
'orden' => 3,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 60,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Malo',
|
||||
'pregunta_id' => 5,
|
||||
'orden' => 4,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 40,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Pésimo',
|
||||
'pregunta_id' => 5,
|
||||
'orden' => 5,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 20,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
|
||||
//Respuesta 6
|
||||
[
|
||||
'nombre' => 'Excelente',
|
||||
'pregunta_id' => 6,
|
||||
'orden' => 1,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 100,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Bueno',
|
||||
'pregunta_id' => 6,
|
||||
'orden' => 2,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 80,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Regular',
|
||||
'pregunta_id' => 6,
|
||||
'orden' => 3,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 60,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Malo',
|
||||
'pregunta_id' => 6,
|
||||
'orden' => 4,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 40,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Pésimo',
|
||||
'pregunta_id' => 6,
|
||||
'orden' => 5,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 20,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
|
||||
//Respuesta 7
|
||||
[
|
||||
'nombre' => 'Excelente',
|
||||
'pregunta_id' => 7,
|
||||
'orden' => 1,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 100,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Bueno',
|
||||
'pregunta_id' => 7,
|
||||
'orden' => 2,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 80,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Regular',
|
||||
'pregunta_id' => 7,
|
||||
'orden' => 3,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 60,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Malo',
|
||||
'pregunta_id' => 7,
|
||||
'orden' => 4,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 40,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Pésimo',
|
||||
'pregunta_id' => 7,
|
||||
'orden' => 5,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 20,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
|
||||
//Respuesta 8
|
||||
[
|
||||
'nombre' => 'Si',
|
||||
'pregunta_id' => 8,
|
||||
'orden' => 1,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 100,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'No',
|
||||
'pregunta_id' => 8,
|
||||
'orden' => 2,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 50,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
|
||||
//Respuesta 9
|
||||
[
|
||||
'nombre' => 'Excelente',
|
||||
'pregunta_id' => 9,
|
||||
'orden' => 1,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 100,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Bueno',
|
||||
'pregunta_id' => 9,
|
||||
'orden' => 2,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 80,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Regular',
|
||||
'pregunta_id' => 9,
|
||||
'orden' => 3,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 60,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Malo',
|
||||
'pregunta_id' => 9,
|
||||
'orden' => 4,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 40,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Pésimo',
|
||||
'pregunta_id' => 9,
|
||||
'orden' => 5,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 20,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
|
||||
//Respuesta 10
|
||||
[
|
||||
'nombre' => '10-9',
|
||||
'pregunta_id' => 10,
|
||||
'orden' => 1,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 100,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => '8-7',
|
||||
'pregunta_id' => 10,
|
||||
'orden' => 2,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 80,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => '6-5',
|
||||
'pregunta_id' => 10,
|
||||
'orden' => 3,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 60,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => '4-3',
|
||||
'pregunta_id' => 10,
|
||||
'orden' => 4,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 40,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => '2-1',
|
||||
'pregunta_id' => 10,
|
||||
'orden' => 5,
|
||||
'tipo_campo' => 'Checkbox',
|
||||
'puntuacion' => 20,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
|
||||
//Respuesta 11
|
||||
[
|
||||
'nombre' => '',
|
||||
'pregunta_id' => 11,
|
||||
'orden' => 1,
|
||||
'tipo_campo' => 'Email',
|
||||
'puntuacion' => null,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
|
||||
//Respuesta 12
|
||||
[
|
||||
'nombre' => '',
|
||||
'pregunta_id' => 12,
|
||||
'orden' => 1,
|
||||
'tipo_campo' => 'Fecha',
|
||||
'puntuacion' => null,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
76
database/seeds/RolesTableSeeder.php
Normal file
76
database/seeds/RolesTableSeeder.php
Normal file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class RolesTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('roles')->insert([
|
||||
|
||||
[
|
||||
'slug' => 'Atención a cliente',
|
||||
'name' => 'Atención a cliente',
|
||||
'movil' => 0,
|
||||
'web' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'slug' => 'Administradores',
|
||||
'name' => 'Administradores',
|
||||
'movil' => 0,
|
||||
'web' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'slug' => 'Supervisor de operadores',
|
||||
'name' => 'Supervisor de operadores',
|
||||
'movil' => 1,
|
||||
'web' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'slug' => 'Asesor de operaciones',
|
||||
'name' => 'Asesor de operaciones',
|
||||
'movil' => 1,
|
||||
'web' => 0,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'slug' => 'Gerencial',
|
||||
'name' => 'Gerencial',
|
||||
'movil' => 0,
|
||||
'web' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'slug' => 'Auxiliar de operaciones',
|
||||
'name' => 'Auxiliar de operaciones',
|
||||
'movil' => 0,
|
||||
'web' => 0,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
158
database/seeds/ServiciosTableSeeder.php
Normal file
158
database/seeds/ServiciosTableSeeder.php
Normal file
@@ -0,0 +1,158 @@
|
||||
<?php
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class ServiciosTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('cat_servicios')->insert([
|
||||
[
|
||||
'nombre' => 'Barrido Mecanizado',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Desazolve De Fosa Séptica',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Destape',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Detección De Fuga De Agua',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Des-Incrustación De Chicle',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Lavado A Presión De Agua',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Lavado A Vapor',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Limpieza De Aljibe',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Limpieza De Biodigestor',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Limpieza De Cárcamo',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Limpieza De Drenaje',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Limpieza De Drenaje Sanitaria Y Pluvial',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Limpieza De Drenaje Pluvial',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Limpieza De Drenaje Y Trampas De Grasa',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Limpieza De Drenaje Y Trampa De Lodo',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Limpieza De Drenaje Y Video Inspección',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Limpieza Y Desazolve De Noria',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Limpieza De Drenaje Y Pozos De Visita',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Limpieza De Tanque De Grasa',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Limpieza De Trampa De Grasa',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Limpieza De Trampa De Lodo',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Limpieza De Pozo Tormenta',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Localización De Registros',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Retiro De Líquidos Lixiviados',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Restregado De Pisos',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Succión',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Sanitización',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Video Inspección De Tubería De Drenaje',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
111
database/seeds/SolicitudesServicioTableSeeder.php
Normal file
111
database/seeds/SolicitudesServicioTableSeeder.php
Normal file
@@ -0,0 +1,111 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class SolicitudesServicioTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run(Faker\Generator $faker)
|
||||
{
|
||||
for ($i = 1; $i <= 50; $i++){
|
||||
|
||||
$cliente_id = $faker->numberBetween(1,50);
|
||||
|
||||
$domicilio = \App\Models\ClienteDomicilio::where('cliente_id', $cliente_id)->first();
|
||||
|
||||
$operador = \App\Models\User::where('tipo_empleado_id', 2)->inRandomOrder()->first();
|
||||
|
||||
$fecha_actual = Carbon::now();
|
||||
$y = $fecha_actual->format('Y');
|
||||
$m = $fecha_actual->format('m');
|
||||
$d = $faker->numberBetween(1,30);
|
||||
$hora = $faker->time($format = 'H:i:s');
|
||||
$fecha = "$y-$m-$d $hora";
|
||||
|
||||
$data_solicitud_enc = [
|
||||
'forma_pago_id' => $faker->numberBetween(1,6),
|
||||
'fecha_agenda' => $fecha,
|
||||
'usuario_agenda_id' => 1,
|
||||
'cliente_id' => $cliente_id,
|
||||
'cliente_domicilio_id' => $domicilio->id,
|
||||
'sucursal_id' => $operador->sucursal_id
|
||||
];
|
||||
|
||||
$solicitud = \App\Models\ServicioEnc::create($data_solicitud_enc);
|
||||
|
||||
|
||||
$data_solicitud_det = [
|
||||
'servicio_enc_id' => $solicitud->id,
|
||||
'servicio_id' => $faker->numberBetween(1,28),
|
||||
'estatus_servicio_id' => $faker->numberBetween(1,7),
|
||||
'tipo_servicio_id' => $faker->numberBetween(1,2),
|
||||
'fecha_solicitud' => $fecha,
|
||||
'duracion' => '02:30:00',
|
||||
'definido_cliente' => $faker->numberBetween(0,1),
|
||||
'costo_servicio' => $faker->numberBetween(1000,5000).'.'.$faker->numberBetween(10,99),
|
||||
'operador_id' => $operador->id,
|
||||
'vehiculo_id' => 1,
|
||||
'auxiliar_1' => $faker->numberBetween(6,7),
|
||||
'auxiliar_2' => $faker->numberBetween(8,9)
|
||||
];
|
||||
|
||||
$solicitud_det = \App\Models\ServicioDet::create($data_solicitud_det);
|
||||
|
||||
$now = Carbon::now()->toDateTimeString();
|
||||
|
||||
$data_solicitud_progreso = [
|
||||
'servicio_enc_id' => $solicitud->id,
|
||||
'servicio_det_id' => $solicitud_det->id,
|
||||
'fecha_ini_servidor' => $now,
|
||||
'fecha_fin_servidor' => $now,
|
||||
'fecha_ini_celular' => $now,
|
||||
'fecha_fin_celular' => $now,
|
||||
'duracion' => '02:30:00',
|
||||
'lat_ini' => $faker->latitude($min = 21, $max = 26),
|
||||
'lng_ini' => $faker->longitude($min = -101, $max = -106),
|
||||
'lat_fin' => $faker->latitude($min = 21, $max = 26),
|
||||
'lng_fin' => $faker->longitude($min = -101, $max = -106),
|
||||
'comentarios' => 'Todo bien.'
|
||||
];
|
||||
|
||||
$solicitud_progreso = \App\Models\ServicioProgreso::create($data_solicitud_progreso);
|
||||
|
||||
for($j=1; $j<=3; $j++){
|
||||
|
||||
if($j == 1){
|
||||
$etapa = 'Inicio';
|
||||
}
|
||||
|
||||
if($j == 2){
|
||||
$etapa = 'Proceso';
|
||||
}
|
||||
|
||||
if($j == 2){
|
||||
$etapa = 'Final';
|
||||
}
|
||||
|
||||
$soli = $solicitud->id;
|
||||
$servi = $solicitud_det->id;
|
||||
|
||||
$data_solicitud_evidencia = [
|
||||
'servicio_progreso_id' => $solicitud_progreso->id,
|
||||
'uuid' => $faker->sha256,
|
||||
'etapa' => $etapa,
|
||||
'lat' => $faker->latitude($min = 21, $max = 26),
|
||||
'lng' => $faker->longitude($min = -101, $max = -106)
|
||||
];
|
||||
|
||||
$evidencia = \App\Models\ServicioEvidencia::create($data_solicitud_evidencia);
|
||||
|
||||
$evi = $evidencia->id;
|
||||
$evidencia->update(['imagen' => "solicitud_".$soli."_servicio_".$servi."_evidencia_id_".$evi.".jpeg"]);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
30
database/seeds/SucursalesTableSeeder.php
Normal file
30
database/seeds/SucursalesTableSeeder.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class SucursalesTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('sucursales')->insert([
|
||||
[
|
||||
'nombre' => 'Culiacán',
|
||||
'calle' => 'Pascual Orozco',
|
||||
'num_ext' => '1949',
|
||||
'colonia' => 'Nuevo Culiacán',
|
||||
'cp' => '80170',
|
||||
'telefono' => '6677139250',
|
||||
'gerente' => 'Gabriel Salazar',
|
||||
'encargado' => 'Brenda Tamayo',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
||||
60
database/seeds/TiposEmpleadosTableSeeder.php
Normal file
60
database/seeds/TiposEmpleadosTableSeeder.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class TiposEmpleadosTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('tipos_empleados')->insert([
|
||||
[
|
||||
'nombre' => 'Administradores',
|
||||
'login' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Asesor de Operaciones',
|
||||
'login' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Auxiliar de Operaciones 1',
|
||||
'login' => 0,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Auxiliar de Operaciones 2',
|
||||
'login' => 0,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Atención a cliente',
|
||||
'login' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Supervisor de operadores',
|
||||
'login' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Gerencial',
|
||||
'login' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
29
database/seeds/TiposServiciosTableSeeder.php
Normal file
29
database/seeds/TiposServiciosTableSeeder.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class TiposServiciosTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('cat_tipos_servicios')->insert([
|
||||
|
||||
[
|
||||
'nombre' => 'Domestico',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'Empresarial',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
87
database/seeds/TiposVehiculosTableSeeder.php
Normal file
87
database/seeds/TiposVehiculosTableSeeder.php
Normal file
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class TiposVehiculosTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('cat_tipos_vehiculos')->insert([
|
||||
[
|
||||
'nombre' => 'EDUCTOR',
|
||||
'objetivo_mensual' => 840,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'VACTOR',
|
||||
'objetivo_mensual' => 360,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'BARREDORA TENNAT',
|
||||
'objetivo_mensual' => 0,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'HIDROLAVADORA',
|
||||
'objetivo_mensual' => 0,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'RESTREGADORA TENNAN M.T20 ',
|
||||
'objetivo_mensual' => 0,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'CAMIÓN HINO',
|
||||
'objetivo_mensual' => 360,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],[
|
||||
'nombre' => 'CALDERA',
|
||||
'objetivo_mensual' => 0,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],[
|
||||
'nombre' => 'QUITA-CHICLES',
|
||||
'objetivo_mensual' => 0,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],[
|
||||
'nombre' => 'BARREDORA ELGIN',
|
||||
'objetivo_mensual' => 0,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'BARREDORA TENNAN M.6400-5696 ',
|
||||
'objetivo_mensual' => 0,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'CAMIÓN VACTOR',
|
||||
'objetivo_mensual' => 0,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
[
|
||||
'nombre' => 'BARREDORA TENNAN 6540 ',
|
||||
'objetivo_mensual' => 0,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
||||
247
database/seeds/UsersTableSeeder.php
Normal file
247
database/seeds/UsersTableSeeder.php
Normal file
@@ -0,0 +1,247 @@
|
||||
<?php
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class UsersTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
|
||||
/*$atencion =
|
||||
[
|
||||
'email' => 'atencionclientes@mail.com',
|
||||
'password' => bcrypt('secret'),
|
||||
'nombre' => 'Atención',
|
||||
'apellido_materno' => 'Clientes',
|
||||
'apellido_paterno'=> 'Clientes',
|
||||
'telefono' => '6677889900',
|
||||
'tipo_empleado_id' => 5,
|
||||
'sucursal_id' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
];
|
||||
|
||||
$user_atencion = \App\Models\User::create($atencion);
|
||||
|
||||
\App\Models\RolUser::create([
|
||||
'user_id' => $user_atencion->id,
|
||||
'role_id' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
]);*/
|
||||
|
||||
$admin =
|
||||
[
|
||||
'email' => 'administrador@mail.com',
|
||||
'password' => bcrypt('secret'),
|
||||
'nombre' => 'Administrador',
|
||||
'apellido_materno' => 'Administrador',
|
||||
'apellido_paterno'=> 'Administrador',
|
||||
'telefono' => '6677889900',
|
||||
'tipo_empleado_id' => 1,
|
||||
'sucursal_id' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
];
|
||||
|
||||
$user_admin = \App\Models\User::create($admin);
|
||||
|
||||
\App\Models\RolUser::create([
|
||||
'user_id' => $user_admin->id,
|
||||
'role_id' => 2,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
]);
|
||||
|
||||
/*$supervisor =
|
||||
[
|
||||
'email' => 'supervisor@mail.com',
|
||||
'password' => bcrypt('secret'),
|
||||
'nombre' => 'Supervisor',
|
||||
'apellido_materno' => 'Operadores',
|
||||
'apellido_paterno'=> 'Operadores',
|
||||
'telefono' => '6677889900',
|
||||
'tipo_empleado_id' => 1,
|
||||
'sucursal_id' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
];
|
||||
|
||||
$user_super = \App\Models\User::create($supervisor);
|
||||
|
||||
\App\Models\RolUser::create([
|
||||
'user_id' => $user_super->id,
|
||||
'role_id' => 3,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
]);
|
||||
|
||||
$operador =
|
||||
[
|
||||
'email' => 'operador@mail.com',
|
||||
'password' => bcrypt('secret'),
|
||||
'nombre' => 'Operador',
|
||||
'apellido_materno' => 'Operador',
|
||||
'apellido_paterno'=> 'Operador',
|
||||
'telefono' => '6677889900',
|
||||
'tipo_empleado_id' => 2,
|
||||
'sucursal_id' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
];
|
||||
|
||||
$user_operador = \App\Models\User::create($operador);
|
||||
|
||||
\App\Models\RolUser::create([
|
||||
'user_id' => $user_operador->id,
|
||||
'role_id' => 4,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
]);
|
||||
|
||||
$gerente =
|
||||
[
|
||||
'email' => 'gerente@mail.com',
|
||||
'password' => bcrypt('secret'),
|
||||
'nombre' => 'Gerente',
|
||||
'apellido_materno' => 'Gerente',
|
||||
'apellido_paterno'=> 'Gerente',
|
||||
'telefono' => '6677889900',
|
||||
'tipo_empleado_id' => 1,
|
||||
'sucursal_id' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
];
|
||||
|
||||
$user_gerente = \App\Models\User::create($gerente);
|
||||
|
||||
\App\Models\RolUser::create([
|
||||
'user_id' => $user_gerente->id,
|
||||
'role_id' => 5,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
]);
|
||||
|
||||
$auxiliar1 =
|
||||
[
|
||||
'email' => 'auxiliar1@mail.com',
|
||||
'password' => bcrypt('secret'),
|
||||
'nombre' => 'Auxiliar 1',
|
||||
'apellido_materno' => 'Auxiliar',
|
||||
'apellido_paterno'=> 'Auxiliar',
|
||||
'telefono' => '6677889900',
|
||||
'tipo_empleado_id' => 3,
|
||||
'sucursal_id' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
];
|
||||
|
||||
$user_auxiliar_1 = \App\Models\User::create($auxiliar1);
|
||||
|
||||
\App\Models\RolUser::create([
|
||||
'user_id' => $user_auxiliar_1->id,
|
||||
'role_id' => 6,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
]);
|
||||
|
||||
$auxiliar2 =
|
||||
[
|
||||
'email' => 'auxiliar2@mail.com',
|
||||
'password' => bcrypt('secret'),
|
||||
'nombre' => 'Auxiliar 2',
|
||||
'apellido_materno' => 'Auxiliar',
|
||||
'apellido_paterno'=> 'Auxiliar',
|
||||
'telefono' => '6677889900',
|
||||
'tipo_empleado_id' => 4,
|
||||
'sucursal_id' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
];
|
||||
|
||||
$user_auxiliar_2 = \App\Models\User::create($auxiliar2);
|
||||
|
||||
\App\Models\RolUser::create([
|
||||
'user_id' => $user_auxiliar_2->id,
|
||||
'role_id' => 6,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
]);
|
||||
|
||||
$auxiliar3 =
|
||||
[
|
||||
'email' => 'auxiliar3@mail.com',
|
||||
'password' => bcrypt('secret'),
|
||||
'nombre' => 'Auxiliar 3',
|
||||
'apellido_materno' => 'Auxiliar',
|
||||
'apellido_paterno'=> 'Auxiliar',
|
||||
'telefono' => '6677889900',
|
||||
'tipo_empleado_id' => 3,
|
||||
'sucursal_id' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
];
|
||||
|
||||
$user_auxiliar_3 = \App\Models\User::create($auxiliar3);
|
||||
|
||||
\App\Models\RolUser::create([
|
||||
'user_id' => $user_auxiliar_3->id,
|
||||
'role_id' => 6,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
]);
|
||||
|
||||
$auxiliar4 =
|
||||
[
|
||||
'email' => 'auxiliar4@mail.com',
|
||||
'password' => bcrypt('secret'),
|
||||
'nombre' => 'Auxiliar 4',
|
||||
'apellido_materno' => 'Auxiliar',
|
||||
'apellido_paterno'=> 'Auxiliar',
|
||||
'telefono' => '6677889900',
|
||||
'tipo_empleado_id' => 4,
|
||||
'sucursal_id' => 1,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
];
|
||||
|
||||
$user_auxiliar_4 = \App\Models\User::create($auxiliar4);
|
||||
|
||||
\App\Models\RolUser::create([
|
||||
'user_id' => $user_auxiliar_4->id,
|
||||
'role_id' => 6,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
]);
|
||||
|
||||
$operador =
|
||||
[
|
||||
'email' => 'operador2@mail.com',
|
||||
'password' => bcrypt('secret'),
|
||||
'nombre' => 'Operador2',
|
||||
'apellido_materno' => 'Operador2',
|
||||
'apellido_paterno'=> 'Operador2',
|
||||
'telefono' => '6677889900',
|
||||
'tipo_empleado_id' => 2,
|
||||
'sucursal_id' => 2,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
];
|
||||
|
||||
$user_operador = \App\Models\User::create($operador);
|
||||
|
||||
\App\Models\RolUser::create([
|
||||
'user_id' => $user_operador->id,
|
||||
'role_id' => 4,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
]);*/
|
||||
}
|
||||
}
|
||||
20
database/seeds/VehiculosSucursalesTableSeeder.php
Normal file
20
database/seeds/VehiculosSucursalesTableSeeder.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class VehiculosSucursalesTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$vehiculos = \App\Models\Vehiculo::get();
|
||||
|
||||
foreach ($vehiculos as $v){
|
||||
\App\Models\VehiculoSucursal::create(['vehiculo_id' => $v->id, 'sucursal_id' => 1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
90
database/seeds/VehiculosTableSeeder.php
Normal file
90
database/seeds/VehiculosTableSeeder.php
Normal file
@@ -0,0 +1,90 @@
|
||||
<?php
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class VehiculosTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run(Faker\Generator $faker)
|
||||
{
|
||||
|
||||
for ($i = 1; $i<=49 ; $i++){
|
||||
|
||||
$tipo_vehiculo_id = 0;
|
||||
|
||||
if($i == 2 || $i == 8 || $i == 11 || $i == 17 || $i == 23 || $i == 27 || $i == 30 || $i == 34 || $i == 36 || $i == 39 || $i == 40 || $i == 46 || $i == 50){
|
||||
$tipo_vehiculo_id = 1;
|
||||
}
|
||||
|
||||
if($i == 4 || $i == 7 || $i == 16 || $i == 28 || $i == 38 || $i == 49){
|
||||
$tipo_vehiculo_id = 2;
|
||||
}
|
||||
|
||||
if($i == 10){
|
||||
$tipo_vehiculo_id = 3;
|
||||
}
|
||||
|
||||
if($i == 12){
|
||||
$tipo_vehiculo_id = 4;
|
||||
}
|
||||
|
||||
if($i == 13 || $i == 33){
|
||||
$tipo_vehiculo_id = 5;
|
||||
}
|
||||
|
||||
if($i == 19 || $i == 26 || $i == 47){
|
||||
$tipo_vehiculo_id = 6;
|
||||
}
|
||||
|
||||
if($i == 22){
|
||||
$tipo_vehiculo_id = 7;
|
||||
}
|
||||
|
||||
if($i == 24){
|
||||
$tipo_vehiculo_id = 8;
|
||||
}
|
||||
|
||||
if($i == 32){
|
||||
$tipo_vehiculo_id = 9;
|
||||
}
|
||||
|
||||
if($i == 37){
|
||||
$tipo_vehiculo_id = 10;
|
||||
}
|
||||
|
||||
if($i == 41 || $i == 44){
|
||||
$tipo_vehiculo_id = 11;
|
||||
}
|
||||
|
||||
if($i == 48){
|
||||
$tipo_vehiculo_id = 12;
|
||||
}
|
||||
|
||||
if($tipo_vehiculo_id == 0){
|
||||
$tipo_vehiculo_id = 1;
|
||||
|
||||
$data = [
|
||||
'num_economico' => "M$i",
|
||||
'tipo_vehiculo_id' => $tipo_vehiculo_id,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
'deleted_at' => Carbon::now()->toDateTimeString(),
|
||||
];
|
||||
}else{
|
||||
$data = [
|
||||
'num_economico' => "M$i",
|
||||
'tipo_vehiculo_id' => $tipo_vehiculo_id,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
];
|
||||
}
|
||||
|
||||
DB::table('cat_vehiculos')->insert($data);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user