40 lines
1.1 KiB
PHP
40 lines
1.1 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
return new class () extends Migration {
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('transmittal', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->string('series');
|
|
$table->foreignId('client_id')->constrained();
|
|
$table->foreignId('branch_id')->nullable()->constrained();
|
|
$table->date('date_created');
|
|
$table->date('date_dispatch')->nullable();
|
|
$table->date('date_received')->nullable();
|
|
$table->string('received_by')->nullable();
|
|
$table->boolean('received')->default(false);
|
|
$table->foreignId('user_id')->nullable()->constrained();
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('transmittal');
|
|
}
|
|
};
|