Alta de modificaciones de grupo con alumbnos y docentes
This commit is contained in:
@@ -14,6 +14,8 @@ return new class extends Migration
|
||||
Schema::create('alumno_status', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('color');
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,13 @@ return new class extends Migration
|
||||
{
|
||||
Schema::create('materias', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('clave')->nullable();
|
||||
$table->unsignedBigInteger('plan_id'); // pertenece a un plan de estudios
|
||||
$table->integer('ciclo'); // en qué ciclo se imparte
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('plan_id')->references('id')->on('plans');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,8 @@ return new class extends Migration
|
||||
{
|
||||
Schema::create('docentes', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->unsignedBigInteger('usuario_registro');
|
||||
$table->unsignedBigInteger('status')->default('1');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -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('becas', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('description');
|
||||
$table->unsignedBigInteger('inscripcion')->default(0);
|
||||
$table->unsignedBigInteger('reinscripcion')->default(0);
|
||||
$table->unsignedBigInteger('seguro')->default(0);
|
||||
$table->unsignedBigInteger('colegiatura')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('becas');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,29 @@
|
||||
<?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('docente_user', function (Blueprint $table) {
|
||||
$table->unsignedBigInteger('docente_id');
|
||||
$table->foreign('docente_id')->references('id')->on('docentes');
|
||||
$table->unsignedBigInteger('user_id');
|
||||
$table->foreign('user_id')->references('id')->on('users');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('docente_user');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,27 @@
|
||||
<?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('tareas', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('tareas');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('docente_grupo', function (Blueprint $table) {
|
||||
$table->unsignedBigInteger('docente_id');
|
||||
$table->unsignedBigInteger('grupo_id');
|
||||
$table->unsignedBigInteger('materia_id');
|
||||
|
||||
$table->foreign('docente_id')->references('id')->on('docentes');
|
||||
$table->foreign('grupo_id')->references('id')->on('grupos');
|
||||
$table->foreign('materia_id')->references('id')->on('materials');
|
||||
|
||||
$table->unique(['docente_id', 'grupo_id', 'materia_id']);
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('docente_grupo');
|
||||
}
|
||||
};
|
||||
@@ -11,27 +11,33 @@ class AlumnoStatusSeeder extends Seeder
|
||||
public function run(): void
|
||||
{
|
||||
DB::table('alumno_status')->insert([
|
||||
'name' => 'prospecto'
|
||||
'name' => 'prospecto',
|
||||
'color' => 'primary'
|
||||
]);
|
||||
|
||||
DB::table('alumno_status')->insert([
|
||||
'name' => 'inscrito'
|
||||
'name' => 'inscrito',
|
||||
'color' => 'warning'
|
||||
]);
|
||||
|
||||
DB::table('alumno_status')->insert([
|
||||
'name' => 'alumno'
|
||||
'name' => 'alumno',
|
||||
'color' => 'success'
|
||||
]);
|
||||
|
||||
DB::table('alumno_status')->insert([
|
||||
'name' => 'baja temporal'
|
||||
'name' => 'baja temporal',
|
||||
'color' => 'secondary'
|
||||
]);
|
||||
|
||||
DB::table('alumno_status')->insert([
|
||||
'name' => 'baja definitiva'
|
||||
'name' => 'baja definitiva',
|
||||
'color' => 'danger'
|
||||
]);
|
||||
|
||||
DB::table('alumno_status')->insert([
|
||||
'name' => 'graduado'
|
||||
'name' => 'graduado',
|
||||
'color' => ''
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ class PlanSeeder extends Seeder
|
||||
'duracion'=>6,
|
||||
'duration_id'=>1,
|
||||
'nivel'=>1,
|
||||
'carrera'=>2
|
||||
'carrera'=>1
|
||||
]);
|
||||
$plan1->planesPlantel()->sync([1,2,3]);
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ class PlaneSeeder extends Seeder
|
||||
'status' => 1
|
||||
]);
|
||||
$plan1->planPlantel()->sync([1,2,3]);
|
||||
$plan1->nivelPlane()->sync([1]);
|
||||
|
||||
$plan2=Plane::create([
|
||||
'name' => 'LICENCIATURA',
|
||||
@@ -23,6 +24,8 @@ class PlaneSeeder extends Seeder
|
||||
]);
|
||||
|
||||
$plan2->planPlantel()->sync([1,2,3]);
|
||||
$plan2->nivelPlane()->sync([2]);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,9 +136,9 @@ class RoleSeeder extends Seeder
|
||||
Permission::create(['name'=>'docente.edit','description'=>'Editar docentes'])->syncRoles([$role1,$role6]);
|
||||
Permission::create(['name'=>'docente.destroy','description'=>'Eliminar docentes'])->syncRoles([$role1,$role6]);
|
||||
|
||||
Permission::create(['name'=>'documentoTipo.index','description'=>'Ver documentos por nivel'])->syncRoles([$role1]);
|
||||
Permission::create(['name'=>'documentoTipo.create','description'=>'Crear documentos por nivel'])->syncRoles([$role1]);
|
||||
Permission::create(['name'=>'documentoTipo.edit','description'=>'Editar documentos por nivel'])->syncRoles([$role1]);
|
||||
Permission::create(['name'=>'documentoTipo.destroy','description'=>'Eliminar documentos por nivel'])->syncRoles([$role1]);
|
||||
Permission::create(['name'=>'documentoTipo.index','description'=>'Ver documentación'])->syncRoles([$role1]);
|
||||
Permission::create(['name'=>'documentoTipo.create','description'=>'Crear documentación'])->syncRoles([$role1]);
|
||||
Permission::create(['name'=>'documentoTipo.edit','description'=>'Editar documentación'])->syncRoles([$role1]);
|
||||
Permission::create(['name'=>'documentoTipo.destroy','description'=>'Eliminar documentación'])->syncRoles([$role1]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ class UserSeeder extends Seeder
|
||||
'medio' => 1,
|
||||
'usuario_registro' => 1,
|
||||
'plane_id' => 0,
|
||||
'status' => 2
|
||||
'status' => 1
|
||||
]);
|
||||
|
||||
$alumno->alumnos()->sync($usr->id);
|
||||
|
||||
Reference in New Issue
Block a user