Transformed into pivot models and Created ResumeSlotValue
Some checks failed
linter / quality (push) Successful in 3m39s
tests / ci (push) Failing after 6m30s

This commit is contained in:
2025-08-17 11:58:55 +02:00
parent c9f499cf2d
commit 08425938d4
13 changed files with 261 additions and 10 deletions

View File

@@ -0,0 +1,23 @@
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\ResumeComponentInput>
*/
class ResumeComponentInputFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
];
}
}

View File

@@ -13,7 +13,7 @@ return new class extends Migration
*/
public function up(): void
{
Schema::create('resume_resume_component', function (Blueprint $table) {
Schema::create('resume_slots', function (Blueprint $table) {
$table->id();
$table->foreignIdFor(Resume::class)->constrained()->onDelete('cascade');
@@ -21,8 +21,6 @@ return new class extends Migration
$table->integer('order')->default(0);
$table->json('data')->comment('JSON structure to define the data for the resume component');
$table->timestamps();
});
}
@@ -32,6 +30,6 @@ return new class extends Migration
*/
public function down(): void
{
Schema::dropIfExists('resume_resume_component_link');
Schema::dropIfExists('resume_slots');
}
};

View File

@@ -14,7 +14,7 @@ return new class extends Migration
Schema::create('resume_component_data_types', function (Blueprint $table) {
$table->id();
$table->json('data_structure')->comment('JSON structure to define the data validation in laravel validation format (https://laravel.com/docs/12.x/validation#quick-writing-the-validation-logic)');
$table->string('data_structure')->comment('valid format for the value in Laravel validation format (https://laravel.com/docs/12.x/validation#quick-writing-the-validation-logic)');
$table->string('vue_component_name');
$table->timestamps();

View File

@@ -0,0 +1,36 @@
<?php
use App\Models\ResumeComponent;
use App\Models\ResumeComponentDataType;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('resume_component_inputs', function (Blueprint $table) {
$table->id();
$table->foreignIdFor(ResumeComponent::class)->constrained()->onDelete('cascade');
$table->foreignIdFor(ResumeComponentDataType::class)->constrained()->onDelete('cascade');
$table->string('name');
$table->string("placeholder");
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('resume_component_inputs');
}
};

View File

@@ -0,0 +1,35 @@
<?php
use App\Models\ResumeComponentInput;
use App\Models\ResumeSlot;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('resume_slot_values', function (Blueprint $table) {
$table->id();
$table->foreignIdFor(ResumeSlot::class);
$table->foreignIdFor(ResumeComponentInput::class);
$table->string('value');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('resume_slot_value');
}
};