id(); $table->foreignId('user_id')->constrained('users')->cascadeOnDelete(); $table->foreignId('machine_id')->nullable()->constrained('cmms_machines')->noActionOnDelete(); $table->foreignId('rahdar_id')->constrained('rahdaran')->noActionOnDelete(); $table->foreignId('state_id')->constrained('mission_states')->noActionOnDelete(); $table->string('state_name'); $table->foreignId('province_id')->constrained('provinces')->noActionOnDelete(); $table->string('province_name'); $table->foreignId('edare_shahri_id')->constrained('edarate_shahri')->noActionOnDelete(); $table->string('edare_shahri_name'); $table->string('requested_machine_type'); $table->integer('requested_machine_numbers'); $table->string('type'); $table->dateTime('start_date'); $table->dateTime('end_date'); $table->dateTime('request_date'); $table->text('description')->nullable(); $table->string('start_point'); $table->string('end_point'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('missions'); } };