se terminaron los modelos, faltan controlarlos con la IA
This commit is contained in:
+4
@@ -15,6 +15,10 @@ return new class extends Migration
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->string('descripcion');
|
||||
|
||||
$table->foreignId('formulario_id')->nullable()
|
||||
->constrained('formularios')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
+4
@@ -15,6 +15,10 @@ return new class extends Migration
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->string('descripcion');
|
||||
|
||||
$table->foreignId('formulario_id')->nullable()
|
||||
->constrained('formularios')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -15,6 +15,10 @@ return new class extends Migration
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->string('telefono');
|
||||
|
||||
$table->foreignId('persona_id')
|
||||
->constrained('personas')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ return new class extends Migration
|
||||
$table->foreignId('foto_id')
|
||||
->constrained('fotos')
|
||||
->onDelete('cascade');
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,10 @@ return new class extends Migration
|
||||
$table->foreignId('foto_id')
|
||||
->constrained('fotos')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreignId('telefono_id')
|
||||
->constrained('telefonos')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,11 @@ return new class extends Migration
|
||||
|
||||
$table->string('dni');
|
||||
$table->string('correo');
|
||||
|
||||
$table->foreignId('credencialcliente_id')
|
||||
->constrained('credencialesclientes')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreignId('persona_id')
|
||||
->constrained('personas')
|
||||
->onDelete('cascade');
|
||||
|
||||
@@ -23,7 +23,7 @@ return new class extends Migration
|
||||
$table->foreignId('profesion_id')
|
||||
->constrained('profesiones');
|
||||
|
||||
$table->foreignId('servicio_id')
|
||||
$table->foreignId('servicio_id')->nullable()
|
||||
->constrained('servicios');
|
||||
|
||||
$table->foreignId('modalidad_id')
|
||||
@@ -37,6 +37,16 @@ return new class extends Migration
|
||||
->constrained('clientes')
|
||||
->onDelete('set null');
|
||||
|
||||
$table->foreignId('diapreferido_id')
|
||||
->constrained('diaspreferencias')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreignId('horariopreferido_id')
|
||||
->constrained('horariospreferencias')
|
||||
->onDelete('cascade');
|
||||
|
||||
|
||||
|
||||
$table->date('fechaenvio');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -18,6 +18,9 @@ return new class extends Migration
|
||||
$table->foreignId('agenda_id')
|
||||
->constrained('agendas')
|
||||
->onDelete('cascade');
|
||||
$table->foreignId('dia_id')->nullable()
|
||||
->constrained('dias')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -15,9 +15,6 @@ return new class extends Migration
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->string('descripcion');
|
||||
$table->foreignId('agenda_id')
|
||||
->constrained('agendas')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@ return new class extends Migration
|
||||
$table->timestamps();
|
||||
$table->time('comienzo');
|
||||
$table->time('fin');
|
||||
$table->foreignId('dia_id')
|
||||
->constrained('dias')
|
||||
$table->foreignId('diadeatencion_id')
|
||||
->constrained('diasdeatenciones')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -30,6 +30,14 @@ return new class extends Migration
|
||||
$table->foreignId('agenda_id')
|
||||
->constrained('agendas')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreignId('profesional_id')
|
||||
->constrained('profesionales')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreignId('servicio_id')
|
||||
->constrained('servicios')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
class BajaSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$credencial = [
|
||||
'dni' => '40987654',
|
||||
'correo' => 'ficticio@gmail.com',
|
||||
'persona_id' =>
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
class CredencialClienteSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$credencial = [
|
||||
'contra' => bcrypt('contraseña'),
|
||||
'correo' => 'ficticio@gmail.com',
|
||||
];
|
||||
|
||||
DB::table('credencialesclientes')->insert($credencial);
|
||||
}
|
||||
}
|
||||
@@ -33,6 +33,8 @@ class DatabaseSeeder extends Seeder
|
||||
CredencialProfesionalSeeder::class,
|
||||
ProfesionalSeeder::class,
|
||||
AdministradorSeeder::class,
|
||||
CredencialClienteSeeder::class,
|
||||
BajaSeeder::class,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class DiasSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$dias = [['descripcion' => 'Lunes'],
|
||||
['descripcion' =>'Martes'],
|
||||
['descripcion' =>'Miércoles'],
|
||||
['descripcion' =>'Jueves'],
|
||||
['descripcion' =>'Viernes'],
|
||||
['descripcion' =>'Sabado'],
|
||||
['descripcion' =>'Domingo']];
|
||||
|
||||
|
||||
foreach($dias as $dia)
|
||||
{
|
||||
DB::table('dias')->insert([
|
||||
'descripcion' => $dia['descripcion'],
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,14 @@ class PersonaSeeder extends Seeder
|
||||
'cuil' => '20432932444',
|
||||
'fechanac' => '2001-04-05',
|
||||
'foto_id' => 1,
|
||||
],
|
||||
[
|
||||
'dni' => '40987654',
|
||||
'nombre' => 'Cliente',
|
||||
'apellido' => 'Ficticio',
|
||||
'cuil' => '20409876544',
|
||||
'fechanac' => '2000-01-01',
|
||||
'foto_id' => 1,
|
||||
]];
|
||||
foreach($personas as $persona){
|
||||
DB::table('personas')->insert([
|
||||
|
||||
Reference in New Issue
Block a user