From e4ce8ee1bd8c5378d401d3e161f1b7e11483e2c3 Mon Sep 17 00:00:00 2001 From: alekeyrivas Date: Mon, 3 Jun 2024 20:21:43 -0600 Subject: [PATCH] Agregue migraciones modelos y controladores de los catalagos --- .../Controllers/caracteristicasController.php | 10 ++++++ app/Http/Controllers/cargosController.php | 10 ++++++ app/Http/Controllers/gruposController.php | 10 ++++++ app/Http/Controllers/profesionController.php | 10 ++++++ app/Http/Controllers/subgrupoController.php | 10 ++++++ app/Models/caracteristicas.php | 11 +++++++ app/Models/cargos.php | 11 +++++++ app/Models/grupos.php | 11 +++++++ app/Models/profesion.php | 11 +++++++ app/Models/subgrupo.php | 11 +++++++ ...4_06_03_183521_create_profesions_table.php | 28 +++++++++++++++++ .../2024_06_03_183943_create_cargos_table.php | 27 ++++++++++++++++ ...03_184326_create_caracteristicas_table.php | 27 ++++++++++++++++ .../2024_06_03_184436_create_grupos_table.php | 27 ++++++++++++++++ ...24_06_03_194040_create_subgrupos_table.php | 31 +++++++++++++++++++ 15 files changed, 245 insertions(+) create mode 100644 app/Http/Controllers/caracteristicasController.php create mode 100644 app/Http/Controllers/cargosController.php create mode 100644 app/Http/Controllers/gruposController.php create mode 100644 app/Http/Controllers/profesionController.php create mode 100644 app/Http/Controllers/subgrupoController.php create mode 100644 app/Models/caracteristicas.php create mode 100644 app/Models/cargos.php create mode 100644 app/Models/grupos.php create mode 100644 app/Models/profesion.php create mode 100644 app/Models/subgrupo.php create mode 100644 database/migrations/2024_06_03_183521_create_profesions_table.php create mode 100644 database/migrations/2024_06_03_183943_create_cargos_table.php create mode 100644 database/migrations/2024_06_03_184326_create_caracteristicas_table.php create mode 100644 database/migrations/2024_06_03_184436_create_grupos_table.php create mode 100644 database/migrations/2024_06_03_194040_create_subgrupos_table.php diff --git a/app/Http/Controllers/caracteristicasController.php b/app/Http/Controllers/caracteristicasController.php new file mode 100644 index 0000000..fa10e14 --- /dev/null +++ b/app/Http/Controllers/caracteristicasController.php @@ -0,0 +1,10 @@ +id(); + $table->string('profesion'); + $table->string('abreviatura'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('profesions'); + } +}; diff --git a/database/migrations/2024_06_03_183943_create_cargos_table.php b/database/migrations/2024_06_03_183943_create_cargos_table.php new file mode 100644 index 0000000..a040eb2 --- /dev/null +++ b/database/migrations/2024_06_03_183943_create_cargos_table.php @@ -0,0 +1,27 @@ +id(); + $table->string('nombre'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('cargos'); + } +}; diff --git a/database/migrations/2024_06_03_184326_create_caracteristicas_table.php b/database/migrations/2024_06_03_184326_create_caracteristicas_table.php new file mode 100644 index 0000000..7eb0ce5 --- /dev/null +++ b/database/migrations/2024_06_03_184326_create_caracteristicas_table.php @@ -0,0 +1,27 @@ +id(); + $table->string('nombre'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('caracteristicas'); + } +}; diff --git a/database/migrations/2024_06_03_184436_create_grupos_table.php b/database/migrations/2024_06_03_184436_create_grupos_table.php new file mode 100644 index 0000000..29f3318 --- /dev/null +++ b/database/migrations/2024_06_03_184436_create_grupos_table.php @@ -0,0 +1,27 @@ +id(); + $table->string('nombre'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('grupos'); + } +}; diff --git a/database/migrations/2024_06_03_194040_create_subgrupos_table.php b/database/migrations/2024_06_03_194040_create_subgrupos_table.php new file mode 100644 index 0000000..abd94b8 --- /dev/null +++ b/database/migrations/2024_06_03_194040_create_subgrupos_table.php @@ -0,0 +1,31 @@ +id(); + $table->unsingendBigInterger('grupo_id')->nullable(); + $table->unsingendBigInterger('subgrupo_id')->nullable(); + + $table->foreign('grupo_id')->references('id')->on('grupos')->nullable(); + $table->foreign('subgrupo_id')->references('id')->on('subgrupo')->nullable(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('subgrupos'); + } +}; -- GitLab