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,46 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateTransportePacienteFaturamentoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('transporte_paciente_faturamento', function (Blueprint $table) {
$table->id();
$table->foreignId('agendamento_id')->constrained('transporte_paciente_agendar_transporte');
$table->foreignId('bpa_procedimento_id')->nullable()->constrained('bpa_procedimento');
$table->foreignId('procedimento_id')->nullable()->constrained('sigtap.procedimento');
$table->foreignId('lotacao_id')->nullable()->constrained('cadastro_lotacao');
$table->foreignId('ocupacao_id')->nullable()->constrained('sigtap.ocupacao');
$table->unsignedSmallInteger('quantidade');
$table->foreignId('cid_principal_id')->nullable()->constrained('sigtap.cid');
$table->foreignId('cid_secundario_id')->nullable()->constrained('sigtap.cid');
$table->foreignId('paciente_id')->constrained('cadastro_paciente');
$table->foreignId('motivo_id')->constrained('transporte_paciente_motivo_viagem_procedimento');
$table->foreignId('destino_id')->constrained('transporte_paciente_destino');
$table->unsignedSmallInteger('distancia')->nullable();
$table->foreignId('usuario_id')->nullable()->constrained('cadastro_usuario');
MigrationUtil::addCommonFields($table);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('transporte_paciente_faturamento');
}
}