feat: Enhance Cost Calculator with StayType integration and cost management features

This commit is contained in:
2025-08-15 00:01:21 +05:45
parent dee5d001b1
commit 5e0913b9f9
9 changed files with 123 additions and 25 deletions

View File

@@ -16,16 +16,51 @@ return new class extends Migration
$table->unsignedInteger('country_id')->nullable();
$table->unsignedInteger('programlevel_id')->nullable();
$table->unsignedInteger('program_id')->nullable();
$table->unsignedInteger('living_status_id')->nullable();
$table->json('living_cost')->nullable();
$table->json('accomodation_cost')->nullable();
$table->json('onetime_cost')->nullable();
$table->json('other_services')->nullable();
$table->unsignedInteger('createdby')->nullable();
$table->unsignedInteger('updatedby')->nullable();
$table->boolean('status')->default(1);
$table->timestamps();
});
Schema::create('living_costs', function (Blueprint $table) {
$table->id();
$table->unsignedInteger('cost_calculator_id')->nullable();
$table->unsignedInteger('stay_type_id')->nullable();
$table->string('monthly')->nullable();
$table->string('yearly')->nullable();
$table->timestamps();
});
Schema::create('accomodation_costs', function (Blueprint $table) {
$table->id();
$table->unsignedInteger('cost_calculator_id')->nullable();
$table->unsignedInteger('stay_type_id')->nullable();
$table->string('monthly')->nullable();
$table->string('yearly')->nullable();
$table->timestamps();
});
Schema::create('onetime_costs', function (Blueprint $table) {
$table->id();
$table->unsignedInteger('cost_calculator_id')->nullable();
$table->unsignedInteger('stay_type_id')->nullable();
$table->string('visa')->nullable();
$table->string('biometrics')->nullable();
$table->string('sevis')->nullable();
$table->string('application')->nullable();
$table->timestamps();
});
Schema::create('service_costs', function (Blueprint $table) {
$table->id();
$table->unsignedInteger('cost_calculator_id')->nullable();
$table->unsignedInteger('stay_type_id')->nullable();
$table->string('flight_ticket')->nullable();
$table->string('insurance')->nullable();
$table->string('extra')->nullable();
$table->timestamps();
});
}
/**
@@ -34,5 +69,9 @@ return new class extends Migration
public function down(): void
{
Schema::dropIfExists('cost_calculators');
Schema::dropIfExists('living_costs');
Schema::dropIfExists('accomodation_costs');
Schema::dropIfExists('onetime_costs');
Schema::dropIfExists('service_costs');
}
};