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,40 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateTransportePacientePreAgendamentoTransporteTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('transporte_paciente_pre_agendamento_transporte', function (Blueprint $table) {
$table->id();
$table->foreignId('paciente_id')->references('id')->on('cadastro_paciente');
$table->foreignId('motivo_id')->references('id')->on('transporte_paciente_motivo_viagem_procedimento');
$table->time('horario');
$table->date('data');
$table->foreignId('municipio_id')->references('id')->on('intranet.cadastro_municipio');
$table->foreignId('destino_id')->references('id')->on('transporte_paciente_destino');
$table->smallInteger('acompanhante');
$table->foreignId('ponto_id')->references('id')->on('transporte_paciente_ponto');
$table->string('observacao', 200)->nullable();
MigrationUtil::addCommonFields($table);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('transporte_paciente_pre_agendamento_transporte');
}
}

View File

@@ -0,0 +1,37 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddColumnsToPreAgendarTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('transporte_paciente_pre_agendamento_transporte', function (Blueprint $table) {
$table->date('data_saida')->nullable();
$table->time('horario_saida')->nullable();
$table->foreignId('veiculo_id')->nullable()->references('id')->on('transporte_paciente_veiculo');
$table->foreignId('jornada_id')->nullable()->references('id')->on('transporte_paciente_jornada');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('transporte_paciente_pre_agendamento_transporte', function (Blueprint $table) {
$table->dropColumn(['data_saida','horario_saida']);
$table->dropConstrainedForeignId('veiculo_id');
$table->dropConstrainedForeignId('jornada_id');
});
}
}

View File

@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddColumnTipoPassageiroOnTranportePacientePreagendarTranporteTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('transporte_paciente_pre_agendamento_transporte', function (Blueprint $table) {
$table->foreignId('tipo_passageiro_id')->nullable()->references('id')->on('transporte_paciente_veiculo_tipo_passageiro');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('transporte_paciente_pre_agendamento_transporte', function (Blueprint $table) {
$table->dropConstrainedForeignId('tipo_passageiro_id');
});
}
}