mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-27 08:24:06 +00:00
a2381e44a7
Update Company Service Class Create Documents Service Class Create File Service Class Base64 File Convert Service Class File Upload Storage Service Class
43 lines
1.2 KiB
PHP
43 lines
1.2 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
class CreateDocumentsTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('documents', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->integer('owner_id')->nullable();
|
|
$table->integer('owner_type')->nullable();
|
|
$table->string('document_type')->nullable();
|
|
$table->string('reference')->nullable();
|
|
$table->integer('status')->nullable();
|
|
$table->bigInteger('approved_by')->unsigned();
|
|
$table->foreign('approved_by')->references('id')->on('users')->onDelete('cascade')->nullable();
|
|
$table->timestamp('issued_date')->nullable();
|
|
$table->timestamp('expired_date')->nullable();
|
|
$table->timestamp('approved_date')->nullable();
|
|
$table->timestamps();
|
|
$table->softDeletes();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('documents');
|
|
}
|
|
}
|