id(); $table->bigInteger('user_id')->unsigned()->nullable(); $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); $table->bigInteger('contract_template_id')->unsigned()->nullable(); $table->foreign('contract_template_id')->references('id')->on('contract_templates')->onDelete('cascade'); $table->string('name')->nullable(); $table->json('in_time_contract_template'); $table->integer('status')->nullable()->default(1); $table->timestamp('completed_at')->nullable(); $table->timestamp('failed_at')->nullable(); $table->timestamp('start_at')->nullable(); $table->timestamp('end_at')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('contracts'); } }