mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-11 15:11:06 +03:30
add transfer section
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateTransfersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('transfers', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('item_id');
|
||||
$table->foreign('item_id')->references('id')->on('items');
|
||||
$table->unsignedBigInteger('user_id');
|
||||
$table->foreign('user_id')->references('id')->on('users');
|
||||
$table->dateTime('from_date')->nullable();
|
||||
$table->dateTime('to_date')->nullable();
|
||||
$table->enum('status', ['approved','rejected','suspended'])->default('suspended');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('transfers');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user