init commit
All checks were successful
build-api-image / build (push) Successful in 51s

This commit is contained in:
Antonio Lopes dos Santos
2026-08-04 16:52:02 -03:00
commit afec302c3e
11594 changed files with 1636728 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateGeralDocumentoTipoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('geral_documento_tipo', function (Blueprint $table) {
MigrationUtil::idWithoutIncrements($table);
$table->string('nome', 3)->unique();
MigrationUtil::addCommonFields($table, ['staticData' => true]);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('geral_documento_tipo');
}
}

View File

@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateGeralTurnoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('geral_turno', function (Blueprint $table) {
MigrationUtil::idWithoutIncrements($table);
$table->string('nome', 5)->unique();
MigrationUtil::addCommonFields($table, ['staticData' => true]);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('geral_turno');
}
}

View File

@@ -0,0 +1,39 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateGeralInterpretacaoImcTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('geral_interpretacao_imc', function (Blueprint $table) {
MigrationUtil::idWithoutIncrements($table);
$table->decimal('min', 3, 1)->nullable();
$table->decimal('max', 3, 1)->nullable();
$table->string('descricao', 17);
$table->string('classificacao', 15);
$table->string('grau_obesidade', 3);
MigrationUtil::addCommonFields($table, ['staticData' => true]);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('geral_interpretacao_imc');
}
}

View File

@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateGeralTipoMedidaAlturaTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('geral_tipo_medida_altura', function (Blueprint $table) {
MigrationUtil::idWithoutIncrements($table);
$table->string('nome', 11)->unique();
MigrationUtil::addCommonFields($table, ['staticData' => true]);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('geral_tipo_medida_altura');
}
}

View File

@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateGeralMedidaTempoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('geral_medida_tempo', function (Blueprint $table) {
MigrationUtil::idWithoutIncrements($table);
$table->string('nome', 9);
MigrationUtil::addCommonFields($table, ['staticData' => true]);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('geral_medida_tempo');
}
}

View File

@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateGeralConfiguracaoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('geral_configuracao', function (Blueprint $table) {
MigrationUtil::idWithoutIncrements($table);
$table->tinyInteger('maximo_tentativa_login')->default(10);
MigrationUtil::addCommonFields($table, ['staticData' => true]);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('geral_configuracao');
}
}

View File

@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateGeralFaixaEtariaTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('geral_faixa_etaria', function (Blueprint $table) {
$table->id();
$table->string('nome', 100)->unique();
MigrationUtil::addCommonFields($table, ['staticData' => true]);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('geral_faixa_etaria');
}
}

View File

@@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateGeralGlasgowAberturaOcularTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('geral_glasgow_abertura_ocular', function (Blueprint $table) {
MigrationUtil::idWithoutIncrements($table);
$table->string('descricao', 30);
$table->tinyInteger('pontos');
MigrationUtil::addCommonFields($table, ['staticData' => true]);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('geral_glasgow_abertura_ocular');
}
}

View File

@@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateGeralGlasgowRespostaVerbalTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('geral_glasgow_resposta_verbal', function (Blueprint $table) {
MigrationUtil::idWithoutIncrements($table);
$table->string('descricao', 30);
$table->tinyInteger('pontos');
MigrationUtil::addCommonFields($table, ['staticData' => true]);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('geral_glasgow_resposta_verbal');
}
}

View File

@@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateGeralGlasgowRespostaMotoraTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('geral_glasgow_resposta_motora', function (Blueprint $table) {
MigrationUtil::idWithoutIncrements($table);
$table->string('descricao', 30);
$table->tinyInteger('pontos');
MigrationUtil::addCommonFields($table, ['staticData' => true]);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('geral_glasgow_resposta_motora');
}
}

View File

@@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateGeralGlasgowReatividadePupilarTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('geral_glasgow_reatividade_pupilar', function (Blueprint $table) {
MigrationUtil::idWithoutIncrements($table);
$table->string('descricao', 30);
$table->tinyInteger('pontos');
MigrationUtil::addCommonFields($table, ['staticData' => true]);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('geral_glasgow_reatividade_pupilar');
}
}

View File

@@ -0,0 +1,37 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateGeralGlasgowInterpretacaoResultadoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('geral_glasgow_interpretacao_resultado', function (Blueprint $table) {
MigrationUtil::idWithoutIncrements($table);
$table->tinyInteger('min');
$table->tinyInteger('max')->nullable();
$table->string('descricao', 30);
MigrationUtil::addCommonFields($table, ['staticData' => true]);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('geral_glasgow_interpretacao_resultado');
}
}

View File

@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class SetMinToNotNullOnGeralInterpretacaoImcTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('geral_interpretacao_imc', function (Blueprint $table) {
$table->decimal('min', 3, 1)->nullable(false)->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('geral_interpretacao_imc', function (Blueprint $table) {
$table->decimal('min', 3, 1)->nullable(true)->change();
});
}
}

View File

@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class SetMaxToNotNullOnGeralInterpretacaoImcTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('geral_interpretacao_imc', function (Blueprint $table) {
$table->decimal('max', 3, 1)->nullable(false)->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('geral_interpretacao_imc', function (Blueprint $table) {
$table->decimal('max', 3, 1)->nullable(true)->change();
});
}
}

View File

@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AlterMinPrecisionOnGeralInterpretacaoImcTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('geral_interpretacao_imc', function (Blueprint $table) {
$table->decimal('min', 5, 1)->nullable(false)->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('geral_interpretacao_imc', function (Blueprint $table) {
$table->decimal('min', 3, 1)->nullable(false)->change();
});
}
}

View File

@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AlterMaxPrecisionOnGeralInterpretacaoImcTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('geral_interpretacao_imc', function (Blueprint $table) {
$table->decimal('max', 5, 1)->nullable(false)->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('geral_interpretacao_imc', function (Blueprint $table) {
$table->decimal('max', 3, 1)->nullable(false)->change();
});
}
}

View File

@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AlterTableGeralDocumentoTipo extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('geral_documento_tipo', function (Blueprint $table) {
$table->string('nome', 4)->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('geral_documento_tipo', function (Blueprint $table) {
$table->string('nome', 3)->change();
});
}
}

View File

@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateGeralDiaSemana extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('geral_dia_semana', function (Blueprint $table) {
$table->id();
$table->string('descricao', 13);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('geral_dia_semana');
}
}

View File

@@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateGeralCiapGrupoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('geral_ciap_grupo', function (Blueprint $table) {
MigrationUtil::idWithoutIncrements($table);
$table->string('descricao', 50);
$table->char('codigo')->unique();
MigrationUtil::addCommonFields($table, ['staticData' => true]);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('geral_ciap_grupo');
}
}

View File

@@ -0,0 +1,38 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateGeralCiapTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('geral_ciap', function (Blueprint $table) {
MigrationUtil::idWithoutIncrements($table);
$table->char('codigo')->unique();
$table->string('descricao', 80);
$table->foreignId('grupo_id')->nullable()->constrained('geral_ciap_grupo');
$table->foreignId('sexo_id')->nullable()->constrained('cadastro_sexo');
MigrationUtil::addCommonFields($table, ['staticData' => true]);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('geral_ciap');
}
}

View File

@@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateGeralCiapCidTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('geral_ciap_cid', function (Blueprint $table) {
MigrationUtil::idWithoutIncrements($table);
$table->string('codigo_ciap', 10);
$table->string('codigo_cid', 10);
MigrationUtil::addCommonFields($table, ['staticData' => true]);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('geral_ciap_cid');
}
}

View File

@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateGeralLmsParametroTipoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('geral_lms_parametro_tipo', function (Blueprint $table) {
MigrationUtil::idWithoutIncrements($table);
$table->string('nome', 50);
MigrationUtil::addCommonFields($table, ['staticData' => true]);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('geral_lms_parametro_tipo');
}
}

View File

@@ -0,0 +1,46 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateGeralLmsParametroTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('geral_lms_parametro', function (Blueprint $table) {
$table->id();
$table->foreignId('tipo_id')->constrained('geral_lms_parametro_tipo');
$table->foreignId('sexo_id')->constrained('cadastro_sexo');
$table->unsignedSmallInteger('mes');
$table->decimal('l', 12, 8);
$table->decimal('m', 12, 8);
$table->decimal('s', 12, 8);
$table->decimal('sd_3_negativo', 12, 8);
$table->decimal('sd_2_negativo', 12, 8);
$table->decimal('sd_1_negativo', 12, 8);
$table->decimal('sd_0', 12, 8);
$table->decimal('sd_1', 12, 8);
$table->decimal('sd_2', 12, 8);
$table->decimal('sd_3', 12, 8);
MigrationUtil::addCommonFields($table, ['staticData' => true]);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('geral_lms_parametro');
}
}

View File

@@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddCodigoIndexesToGeralCiapCidTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('geral_ciap_cid', function (Blueprint $table) {
$table->index('codigo_ciap');
$table->index('codigo_cid');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('geral_ciap_cid', function (Blueprint $table) {
$table->dropIndex(['codigo_ciap']);
$table->dropIndex(['codigo_cid']);
});
}
}

View File

@@ -0,0 +1,30 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateGeralCiapCodigoEsusTable extends Migration
{
public function up()
{
Schema::create('geral_ciap_codigo_esus', function (Blueprint $table) {
$table->id();
$table->foreignId('ciap_id')->constrained('geral_ciap')->onDelete('cascade');
$table->string('codigo', 6);
MigrationUtil::addCommonFields($table, ['staticData' => true]);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('geral_ciap_codigo_esus');
}
}