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,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateLogAcessoFuncionalidadeTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('log_acesso_funcionalidade', function (Blueprint $table) {
$table->id();
$table->foreignId('funcionalidade_id')->constrained('administracao_funcionalidade')->onDelete('cascade');
MigrationUtil::addCommonFields($table);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('log_acesso_funcionalidade');
}
}

View File

@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateLogAcessoSistemaStatusTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('log_acesso_sistema_status', 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('log_acesso_sistema_status');
}
}

View File

@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateLogAcessoSistemaTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('log_acesso_sistema', function (Blueprint $table) {
$table->id();
$table->foreignId('usuario_id')->constrained('cadastro_usuario')->onDelete('cascade');
$table->foreignId('status_id')->constrained('log_acesso_sistema_status');
MigrationUtil::addCommonFields($table, ['staticData' => true]);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('log_acesso_sistema');
}
}

View File

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

View File

@@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateLogCadastroMaterialIntegracaoBnafarMedicamentoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('log_cadastro_material_integracao_bnafar_medicamento', function (Blueprint $table) {
$table->id();
$table->foreignId('operacao_id')->constrained('log_operacao');
$table->foreignId('material_id')->constrained('cadastro_material')->onDelete('cascade');
$table->foreignId('medicamento_id')->constrained('integracao_bnafar_medicamento')->onDelete('cascade');
MigrationUtil::addCommonFields($table);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('log_cadastro_material_integracao_bnafar_medicamento');
}
}

View File

@@ -0,0 +1,37 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateLogAcaoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('log_acao', function (Blueprint $table) {
$table->id();
$table->foreignId('operacao_id')->constrained('log_operacao');
$table->string('namespace', 255)->nullable();
$table->string('table', 255)->nullable();
$table->json('data')->nullable();
MigrationUtil::addCommonFields($table);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('log_acao');
}
}

View File

@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddExternalFieldsToLogAcaoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('log_acao', function (Blueprint $table) {
MigrationUtil::addExternalFields($table);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('log_acao', function (Blueprint $table) {
$table->dropConstrainedForeignId('externo_created_usuario_id');
$table->dropConstrainedForeignId('externo_updated_usuario_id');
});
}
}