id(); $table->foreignId('user_id')->nullable()->constrained('users')->onDelete('set null'); $table->string('name'); $table->string('email'); $table->string('type')->default('intern'); // intern, candidate, employee $table->string('status')->default('preboarding'); // preboarding, active, offboarding, offboarded $table->date('join_date')->nullable(); $table->date('exit_date')->nullable(); $table->string('department')->nullable(); $table->json('assigned_roles')->nullable(); $table->json('assigned_apps')->nullable(); $table->json('checklist')->nullable(); $table->text('notes')->nullable(); $table->foreignId('created_by')->nullable()->constrained('users')->onDelete('set null'); $table->foreignId('offboarded_by')->nullable()->constrained('users')->onDelete('set null'); $table->timestamp('offboarded_at')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('onboardings'); } };