Base de datos creada. Diagrama de clases agregado. Documentación de diagrama de clases y DER agregados.
This commit is contained in:
@@ -14,7 +14,7 @@ return new class extends Migration
|
||||
Schema::create('contenidoswebs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->text('quienes_somos');
|
||||
$table->text('quienessomos');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ return new class extends Migration
|
||||
Schema::create('horariospreferencias', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->text('descripcion');
|
||||
$table->string('descripcion');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ return new class extends Migration
|
||||
Schema::create('diaspreferencias', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->text('descripcion');
|
||||
$table->string('descripcion');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ return new class extends Migration
|
||||
Schema::create('modalidades', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->text('descripcion');
|
||||
$table->string('descripcion');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ return new class extends Migration
|
||||
Schema::create('estadosprofesionales', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->text('descripcion');
|
||||
$table->string('descripcion')->default('Activo');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -14,10 +14,11 @@ return new class extends Migration
|
||||
Schema::create('fotos', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->string('extension');
|
||||
$table->bigInteger('tamanio_bytes');
|
||||
$table->string('nombre');
|
||||
$table->string('mime_type');
|
||||
$table->string('extension')->nullable();
|
||||
$table->bigInteger('tamanio_bytes')->nullable();
|
||||
$table->string('nombre')->nullable();
|
||||
$table->string('mime_type')->nullable();
|
||||
$table->string('ruta')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ return new class extends Migration
|
||||
Schema::create('estadosturnos', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->srting('descripcion');
|
||||
$table->string('descripcion');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@ return new class extends Migration
|
||||
$table->timestamps();
|
||||
$table->text('link');
|
||||
|
||||
$table->foreingId('contenidoweb_id')
|
||||
->constrained('contenidosweb') // apunta a contenidosweb
|
||||
$table->foreignId('contenidoweb_id')
|
||||
->constrained('contenidoswebs') // apunta a contenidoswebs
|
||||
->onDelete('cascade'); // si se borra contenidosweb, se borra la ubicacion
|
||||
});
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ return new class extends Migration
|
||||
$table->string('rol');
|
||||
|
||||
$table->foreignId('accion_id')
|
||||
->constrained('acciones');
|
||||
->constrained('accioneslogs');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -18,8 +18,15 @@ return new class extends Migration
|
||||
$table->string('estado');
|
||||
$table->text('descripcion');
|
||||
|
||||
$table->foreingId('contenidoweb_id')
|
||||
$table->foreignId('contenidoweb_id')
|
||||
->constrained('contenidoswebs');
|
||||
|
||||
$table->foreignId('profesion_id')
|
||||
->constrained('profesiones');
|
||||
|
||||
$table->foreignId('foto_id')
|
||||
->constrained('fotos')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -14,13 +14,13 @@ return new class extends Migration
|
||||
Schema::create('personas', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->string('dni');
|
||||
$table->string('dni')->unique;
|
||||
$table->string('nombre');
|
||||
$table->string('apellido');
|
||||
$table->string('cuil');
|
||||
$table->date('fechanac');
|
||||
|
||||
$table->foreingId('foto_id')
|
||||
$table->foreignId('foto_id')
|
||||
->constrained('fotos')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
|
||||
@@ -15,11 +15,10 @@ return new class extends Migration
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreignId('persona_id')
|
||||
->constrained('personas');
|
||||
|
||||
$table->string('dni');
|
||||
$table->foreign('dni')
|
||||
->references('dni')
|
||||
->on('personas')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->string('correo');
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ return new class extends Migration
|
||||
|
||||
$table->string('matricula');
|
||||
$table->string('correo');
|
||||
$table->string('dni');
|
||||
|
||||
$table->foreignId('credencialprofesional_id')
|
||||
->constrained('credencialesprofesionales');
|
||||
@@ -27,13 +28,11 @@ return new class extends Migration
|
||||
$table->foreignId('estadoprofesional_id')
|
||||
->constrained('estadosprofesionales');
|
||||
|
||||
$table->string('dni');
|
||||
$table->foreign('dni')
|
||||
->references('dni')
|
||||
->on('personas')
|
||||
->onDelete('cascade');
|
||||
$table->foreignId('persona_id')
|
||||
->constrained('personas');
|
||||
|
||||
$table->foreignid('baja_id')
|
||||
$table->foreignId('baja_id')
|
||||
->nullable()
|
||||
->constrained('bajas');
|
||||
|
||||
$table->unique(['profesion_id', 'matricula']);
|
||||
|
||||
@@ -16,9 +16,8 @@ return new class extends Migration
|
||||
$table->timestamps();
|
||||
|
||||
$table->string('dni');
|
||||
$table->foreign('dni')
|
||||
->references('dni')
|
||||
->on('personas')
|
||||
$table->foreignId('persona_id')
|
||||
->constrained('personas')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreignId('telefono_id')
|
||||
|
||||
@@ -14,6 +14,18 @@ return new class extends Migration
|
||||
Schema::create('clientes', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
|
||||
$table->string('dni');
|
||||
$table->string('correo');
|
||||
$table->foreignId('persona_id')
|
||||
->constrained('personas')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreignId('baja_id')->nullable()
|
||||
->constrained('bajas')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->unique(['dni','correo']);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -18,8 +18,6 @@ return new class extends Migration
|
||||
$table->string('nombrecompleto');
|
||||
$table->string('correo');
|
||||
$table->string('celular');
|
||||
$table->string('dniprofpref')->nullable();
|
||||
$table->string('matriculaprofpref')->nullable();
|
||||
$table->string('estado')->defalut('Pendiente');
|
||||
|
||||
$table->foreignId('profesion_id')
|
||||
@@ -30,10 +28,14 @@ return new class extends Migration
|
||||
|
||||
$table->foreignId('modalidad_id')
|
||||
->constrained('modalidades');
|
||||
|
||||
$table->foreignId('profesional_id')->nullable()
|
||||
->constrained('profesionales')
|
||||
->onDelete('set null');
|
||||
|
||||
$table->string('cliente_dni');
|
||||
$table->foreign('cliente_dni')
|
||||
->references('clientes');
|
||||
$table->foreignId('cliente_id')->nullable()
|
||||
->constrained('clientes')
|
||||
->onDelete('set null');
|
||||
|
||||
$table->date('fechaenvio');
|
||||
});
|
||||
|
||||
@@ -23,7 +23,7 @@ return new class extends Migration
|
||||
->constrained('servicios')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->unique(['profesional_id','servicio_id'], 'prof_ser_unique');
|
||||
$table->unique(['profesional_id','servicio_id'], 'profesionales_servicios_unique');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ return new class extends Migration
|
||||
->constrained('clientes')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->string('estadorelacion');
|
||||
$table->string('estadorelacion')->default('Activo');
|
||||
|
||||
$table->unique(['profesional_id','cliente_id'], 'profesionales_clientes_unique');
|
||||
});
|
||||
|
||||
@@ -14,6 +14,10 @@ return new class extends Migration
|
||||
Schema::create('dias', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->string('descripcion');
|
||||
$table->foreignId('agenda_id')
|
||||
->constrained('agendas')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@ return new class extends Migration
|
||||
$table->foreignId('formulario_id')
|
||||
->constrained('formularios')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->unique(['formulario_id','horariopreferencia_id'], 'formularios_horariospreferidos_unique');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@ return new class extends Migration
|
||||
$table->foreignId('formulario_id')
|
||||
->constrained('formularios')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->unique(['formulario_id','diapreferencia_id'], 'formularios_diapreferidos_unique');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,17 @@ return new class extends Migration
|
||||
{
|
||||
Schema::create('profesionales_formularios', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->foreignId('profesional_id')
|
||||
->constrained('profesionales')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreignId('formulario_id')
|
||||
->constrained('formularios')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->string('estado')->default('Pendiente');
|
||||
|
||||
$table->unique(['profesional_id','formulario_id'], 'profesionales_formularios_unique');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('turnos', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->datetime('inicio');
|
||||
$table->string('correo');
|
||||
$table->string('nombrecompleto');
|
||||
$table->text('descripcion');
|
||||
|
||||
$table->foreignId('cliente_id')->nullable() //puede ser que el turno se le asigne a alguien que aún no es cliente
|
||||
->constrained('clientes')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreignId('estadoturno_id')
|
||||
->constrained('estadosturnos')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreignId('agenda_id')
|
||||
->constrained('agendas')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('turnos');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('feriados', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->date('fecha');
|
||||
$table->string('descripcion')->default('Dia no laborable');
|
||||
$table->foreignId('agenda_id')
|
||||
->constrained('agendas')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('feriados');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('modosvacaciones', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->date('inicio');
|
||||
$table->date('fin');
|
||||
$table->string('descripcion')->default('Vacaciones :)');
|
||||
|
||||
$table->foreignId('agenda_id')
|
||||
->constrained('agendas')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('modosvacaciones');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user