Initial commit

This commit is contained in:
2025-08-01 22:04:00 +02:00
commit d1f466d1d4
155 changed files with 15995 additions and 0 deletions

1
database/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
*.sqlite*

View File

@@ -0,0 +1,27 @@
<?php
declare(strict_types=1);
namespace Database\Factories;
use App\Models\Award;
use App\Models\Resume;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Carbon;
/** @extends Factory<Award> */
class AwardFactory extends Factory
{
protected $model = Award::class;
public function definition(): array
{
return [
'title' => $this->faker->word(),
'awarded_at' => Carbon::now(),
'awarder' => $this->faker->word(),
'summary' => $this->faker->text(),
'resume_id' => Resume::factory(),
];
}
}

View File

@@ -0,0 +1,27 @@
<?php
declare(strict_types=1);
namespace Database\Factories;
use App\Models\Certificate;
use App\Models\Resume;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Carbon;
/** @extends Factory<Certificate> */
final class CertificateFactory extends Factory
{
protected $model = Certificate::class;
public function definition(): array
{
return [
'name' => $this->faker->name(),
'date' => Carbon::now(),
'issuer' => $this->faker->word(),
'url' => $this->faker->url(),
'resume_id' => Resume::factory(),
];
}
}

View File

@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
namespace Database\Factories;
use App\Models\Education;
use App\Models\Resume;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Carbon;
/** @extends Factory<Education> */
final class EducationFactory extends Factory
{
protected $model = Education::class;
public function definition(): array
{
return [
'institution' => $this->faker->word(),
'url' => $this->faker->url(),
'area' => $this->faker->word(),
'study_type' => $this->faker->word(),
'start_date' => Carbon::now(),
'end_date' => Carbon::now(),
'score' => $this->faker->word(),
'courses' => $this->faker->words(),
'resume_id' => Resume::factory(),
];
}
}

View File

@@ -0,0 +1,24 @@
<?php
declare(strict_types=1);
namespace Database\Factories;
use App\Models\Interest;
use App\Models\Resume;
use Illuminate\Database\Eloquent\Factories\Factory;
/** @extends Factory<Interest> */
final class InterestFactory extends Factory
{
protected $model = Interest::class;
public function definition(): array
{
return [
'name' => $this->faker->name(),
'keywords' => $this->faker->words(),
'resume_id' => Resume::factory(),
];
}
}

View File

@@ -0,0 +1,24 @@
<?php
declare(strict_types=1);
namespace Database\Factories;
use App\Models\Language;
use App\Models\Resume;
use Illuminate\Database\Eloquent\Factories\Factory;
/** @extends Factory<Language> */
final class LanguageFactory extends Factory
{
protected $model = Language::class;
public function definition(): array
{
return [
'name' => $this->faker->name(),
'fluency' => $this->faker->word(),
'resume_id' => Resume::factory(),
];
}
}

View File

@@ -0,0 +1,21 @@
<?php
declare(strict_types=1);
namespace Database\Factories;
use App\Models\Network;
use Illuminate\Database\Eloquent\Factories\Factory;
/** @extends Factory<Network> */
final class NetworkFactory extends Factory
{
protected $model = Network::class;
public function definition(): array
{
return [
'name' => $this->faker->name(),
];
}
}

View File

@@ -0,0 +1,26 @@
<?php
declare(strict_types=1);
namespace Database\Factories;
use App\Models\Network;
use App\Models\Profile;
use App\Models\Resume;
use Illuminate\Database\Eloquent\Factories\Factory;
/** @extends Factory<Profile> */
final class ProfileFactory extends Factory
{
protected $model = Profile::class;
public function definition(): array
{
return [
'username' => $this->faker->userName(),
'url' => $this->faker->url(),
'network_id' => Network::factory(),
'resume_id' => Resume::factory(),
];
}
}

View File

@@ -0,0 +1,29 @@
<?php
declare(strict_types=1);
namespace Database\Factories;
use App\Models\Project;
use App\Models\Resume;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Carbon;
/** @extends Factory<Project> */
final class ProjectFactory extends Factory
{
protected $model = Project::class;
public function definition(): array
{
return [
'name' => $this->faker->name(),
'start_date' => Carbon::now(),
'end_date' => Carbon::now(),
'description' => $this->faker->text(),
'url' => $this->faker->url(),
'highlights' => $this->faker->words(),
'resume_id' => Resume::factory(),
];
}
}

View File

@@ -0,0 +1,28 @@
<?php
declare(strict_types=1);
namespace Database\Factories;
use App\Models\Publication;
use App\Models\Resume;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Carbon;
/** @extends Factory<Publication> */
final class PublicationFactory extends Factory
{
protected $model = Publication::class;
public function definition(): array
{
return [
'name' => $this->faker->name(),
'publisher' => $this->faker->word(),
'released_at' => Carbon::now(),
'url' => $this->faker->url(),
'summary' => $this->faker->text(),
'resume_id' => Resume::factory(),
];
}
}

View File

@@ -0,0 +1,24 @@
<?php
declare(strict_types=1);
namespace Database\Factories;
use App\Models\Reference;
use App\Models\Resume;
use Illuminate\Database\Eloquent\Factories\Factory;
/** @extends Factory<Reference> */
final class ReferenceFactory extends Factory
{
protected $model = Reference::class;
public function definition(): array
{
return [
'name' => $this->faker->name(),
'reference' => $this->faker->word(),
'resume_id' => Resume::factory(),
];
}
}

View File

@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
namespace Database\Factories;
use App\Models\Resume;
use Illuminate\Database\Eloquent\Factories\Factory;
use PrinsFrank\Standards\Country\CountryAlpha2;
/** @extends Factory<Resume> */
final class ResumeFactory extends Factory
{
protected $model = Resume::class;
public function definition(): array
{
return [
'name' => $this->faker->name(),
'label' => $this->faker->word(),
'email' => $this->faker->unique()->safeEmail(),
'phone' => $this->faker->phoneNumber(),
'url' => $this->faker->url(),
'address' => $this->faker->streetAddress(),
'postal_code' => $this->faker->postcode(),
'city' => $this->faker->city(),
'country_code' => $this->faker->randomElement(CountryAlpha2::cases()),
'region' => $this->faker->word(),
];
}
}

View File

@@ -0,0 +1,25 @@
<?php
declare(strict_types=1);
namespace Database\Factories;
use App\Models\Resume;
use App\Models\Skill;
use Illuminate\Database\Eloquent\Factories\Factory;
/** @extends Factory<Skill> */
final class SkillFactory extends Factory
{
protected $model = Skill::class;
public function definition(): array
{
return [
'name' => $this->faker->name(),
'level' => $this->faker->word(),
'keywords' => $this->faker->words(),
'resume_id' => Resume::factory(),
];
}
}

View File

@@ -0,0 +1,44 @@
<?php
declare(strict_types=1);
namespace Database\Factories;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Str;
/**
* @extends Factory<User>
*/
class UserFactory extends Factory
{
/**
* The current password being used by the factory.
*/
protected static ?string $password;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'name' => fake()->name(),
'email' => fake()->unique()->safeEmail(),
'email_verified_at' => now(),
'password' => static::$password ??= Hash::make('password'),
'remember_token' => Str::random(10),
];
}
public function unverified(): static
{
return $this->state(fn (array $attributes) => [
'email_verified_at' => null,
]);
}
}

View File

@@ -0,0 +1,30 @@
<?php
declare(strict_types=1);
namespace Database\Factories;
use App\Models\Resume;
use App\Models\VolunteerExperience;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Carbon;
/** @extends Factory<VolunteerExperience> */
final class VolunteerExperienceFactory extends Factory
{
protected $model = VolunteerExperience::class;
public function definition(): array
{
return [
'organization' => $this->faker->word(),
'position' => $this->faker->word(),
'url' => $this->faker->url(),
'start_date' => Carbon::now(),
'end_date' => Carbon::now(),
'summary' => $this->faker->text(),
'highlights' => $this->faker->words(),
'resume_id' => Resume::factory(),
];
}
}

View File

@@ -0,0 +1,30 @@
<?php
declare(strict_types=1);
namespace Database\Factories;
use App\Models\Resume;
use App\Models\WorkExperience;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Carbon;
/** @extends Factory<WorkExperience> */
final class WorkExperienceFactory extends Factory
{
protected $model = WorkExperience::class;
public function definition(): array
{
return [
'name' => $this->faker->name(),
'position' => $this->faker->word(),
'url' => $this->faker->url(),
'start_date' => Carbon::now(),
'end_date' => Carbon::now(),
'summary' => $this->faker->text(),
'highlights' => $this->faker->words(),
'resume_id' => Resume::factory(),
];
}
}

View File

@@ -0,0 +1,50 @@
<?php
declare(strict_types=1);
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('users', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->string('name');
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->rememberToken();
$table->timestamps();
});
Schema::create('password_reset_tokens', function (Blueprint $table) {
$table->string('email')->primary();
$table->string('token');
$table->timestamp('created_at')->nullable();
});
Schema::create('sessions', function (Blueprint $table) {
$table->string('id')->primary();
$table->foreignUuid('user_id')->nullable()->index();
$table->string('ip_address', 45)->nullable();
$table->text('user_agent')->nullable();
$table->longText('payload');
$table->integer('last_activity')->index();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('users');
Schema::dropIfExists('password_reset_tokens');
Schema::dropIfExists('sessions');
}
};

View File

@@ -0,0 +1,36 @@
<?php
declare(strict_types=1);
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('cache', function (Blueprint $table) {
$table->string('key')->primary();
$table->mediumText('value');
$table->integer('expiration');
});
Schema::create('cache_locks', function (Blueprint $table) {
$table->string('key')->primary();
$table->string('owner');
$table->integer('expiration');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('cache');
Schema::dropIfExists('cache_locks');
}
};

View File

@@ -0,0 +1,58 @@
<?php
declare(strict_types=1);
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('jobs', function (Blueprint $table) {
$table->id();
$table->string('queue')->index();
$table->longText('payload');
$table->unsignedTinyInteger('attempts');
$table->unsignedInteger('reserved_at')->nullable();
$table->unsignedInteger('available_at');
$table->unsignedInteger('created_at');
});
Schema::create('job_batches', function (Blueprint $table) {
$table->string('id')->primary();
$table->string('name');
$table->integer('total_jobs');
$table->integer('pending_jobs');
$table->integer('failed_jobs');
$table->longText('failed_job_ids');
$table->mediumText('options')->nullable();
$table->integer('cancelled_at')->nullable();
$table->integer('created_at');
$table->integer('finished_at')->nullable();
});
Schema::create('failed_jobs', function (Blueprint $table) {
$table->id();
$table->string('uuid')->unique();
$table->text('connection');
$table->text('queue');
$table->longText('payload');
$table->longText('exception');
$table->timestamp('failed_at')->useCurrent();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('jobs');
Schema::dropIfExists('job_batches');
Schema::dropIfExists('failed_jobs');
}
};

View File

@@ -0,0 +1,39 @@
<?php
declare(strict_types=1);
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('resumes', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->foreignUuid('user_id')->constrained('users')->cascadeOnDelete();
$table->string('name');
$table->string('label');
$table->string('email');
$table->string('phone');
$table->string('url')->nullable();
$table->string('address')->nullable();
$table->string('postal_code')->nullable();
$table->string('city')->nullable();
$table->string('country_code')->nullable();
$table->string('region')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('resumes');
}
};

View File

@@ -0,0 +1,29 @@
<?php
declare(strict_types=1);
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('networks', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->string('name');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('networks');
}
};

View File

@@ -0,0 +1,32 @@
<?php
declare(strict_types=1);
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('profiles', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->foreignUuid('network_id')->constrained('networks')->restrictOnDelete();
$table->foreignUuid('resume_id')->constrained('resumes')->cascadeOnDelete();
$table->string('username');
$table->string('url');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('profiles');
}
};

View File

@@ -0,0 +1,36 @@
<?php
declare(strict_types=1);
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('work_experiences', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->foreignUuid('resume_id')->constrained('resumes')->cascadeOnDelete();
$table->string('name');
$table->string('position');
$table->string('url')->nullable();
$table->date('start_date');
$table->date('end_date')->nullable();
$table->string('summary')->nullable();
$table->json('highlights')->default('[]');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('work_experiences');
}
};

View File

@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
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('languages', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->foreignUuid('resume_id')->constrained('resumes')->cascadeOnDelete();
$table->string('name');
$table->string('fluency');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('languages');
}
};

View File

@@ -0,0 +1,37 @@
<?php
declare(strict_types=1);
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('educations', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->foreignUuid('resume_id')->constrained('resumes')->cascadeOnDelete();
$table->string('institution');
$table->string('url')->nullable();
$table->string('area');
$table->string('study_type');
$table->date('start_date');
$table->date('end_date')->nullable();
$table->decimal('score')->nullable();
$table->json('courses')->default('[]');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('educations');
}
};

View File

@@ -0,0 +1,32 @@
<?php
declare(strict_types=1);
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('skills', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->foreignUuid('resume_id')->constrained('resumes')->cascadeOnDelete();
$table->string('name');
$table->string('level');
$table->json('keywords')->default('[]');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('skills');
}
};

View File

@@ -0,0 +1,36 @@
<?php
declare(strict_types=1);
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('volunteer_experiences', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->foreignUuid('resume_id')->constrained('resumes')->cascadeOnDelete();
$table->string('organization');
$table->string('position');
$table->string('url');
$table->date('start_date');
$table->date('end_date')->nullable();
$table->string('summary');
$table->json('highlights')->default('[]');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('volunteer_experiences');
}
};

View File

@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
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('interests', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->foreignUuid('resume_id')->constrained('resumes')->cascadeOnDelete();
$table->string('name');
$table->json('keywords')->default('[]');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('interests');
}
};

View File

@@ -0,0 +1,33 @@
<?php
declare(strict_types=1);
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('awards', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->foreignUuid('resume_id')->constrained('resumes')->cascadeOnDelete();
$table->string('title');
$table->date('awarded_at');
$table->string('awarder');
$table->string('summary');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('awards');
}
};

View File

@@ -0,0 +1,33 @@
<?php
declare(strict_types=1);
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('certificates', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->foreignUuid('resume_id')->constrained('resumes')->cascadeOnDelete();
$table->string('name');
$table->date('issued_at');
$table->string('issuer');
$table->string('url');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('certificates');
}
};

View File

@@ -0,0 +1,34 @@
<?php
declare(strict_types=1);
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('publications', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->foreignUuid('resume_id')->constrained('resumes')->cascadeOnDelete();
$table->string('name');
$table->string('publisher');
$table->date('released_at');
$table->string('url');
$table->string('summary');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('publications');
}
};

View File

@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
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('references', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->foreignUuid('resume_id')->constrained('resumes')->cascadeOnDelete();
$table->string('name');
$table->string('reference');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('references');
}
};

View File

@@ -0,0 +1,35 @@
<?php
declare(strict_types=1);
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('projects', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->foreignUuid('resume_id')->constrained('resumes')->cascadeOnDelete();
$table->string('name');
$table->date('start_date');
$table->date('end_date')->nullable();
$table->string('description');
$table->string('url');
$table->json('highlights')->default('[]');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('projects');
}
};

View File

@@ -0,0 +1,14 @@
<?php
declare(strict_types=1);
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
public function run(): void
{
}
}