SimBrief integration #405 (#635)

* SimBrief integration #405

* Add briefing as API response; add acars_xml field #405
This commit is contained in:
Nabeel S
2020-03-23 09:31:35 -04:00
committed by GitHub
parent 04b9e37e1d
commit 9e5386264f
70 changed files with 6816 additions and 192 deletions

View File

@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/**
* Add a table to store the Simbrief data
*/
class AddSimbriefTable extends Migration
{
public function up()
{
Schema::create('simbrief', function (Blueprint $table) {
$table->string('id', 36); // The OFP ID
$table->unsignedInteger('user_id');
$table->string('flight_id', 36)->nullable();
$table->string('pirep_id', 36)->nullable();
$table->mediumText('acars_xml');
$table->mediumText('ofp_xml');
$table->timestamps();
$table->primary('id');
$table->index(['user_id', 'flight_id']);
$table->index('pirep_id');
$table->unique('pirep_id'); // Can only belong to a single PIREP
});
}
public function down()
{
Schema::drop('simbrief');
}
}