Initial commit
This commit is contained in:
1
database/.gitignore
vendored
Normal file
1
database/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.sqlite*
|
||||
27
database/factories/AwardFactory.php
Normal file
27
database/factories/AwardFactory.php
Normal 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(),
|
||||
];
|
||||
}
|
||||
}
|
||||
27
database/factories/CertificateFactory.php
Normal file
27
database/factories/CertificateFactory.php
Normal 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(),
|
||||
];
|
||||
}
|
||||
}
|
||||
31
database/factories/EducationFactory.php
Normal file
31
database/factories/EducationFactory.php
Normal 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(),
|
||||
];
|
||||
}
|
||||
}
|
||||
24
database/factories/InterestFactory.php
Normal file
24
database/factories/InterestFactory.php
Normal 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(),
|
||||
];
|
||||
}
|
||||
}
|
||||
24
database/factories/LanguageFactory.php
Normal file
24
database/factories/LanguageFactory.php
Normal 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(),
|
||||
];
|
||||
}
|
||||
}
|
||||
21
database/factories/NetworkFactory.php
Normal file
21
database/factories/NetworkFactory.php
Normal 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(),
|
||||
];
|
||||
}
|
||||
}
|
||||
26
database/factories/ProfileFactory.php
Normal file
26
database/factories/ProfileFactory.php
Normal 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(),
|
||||
];
|
||||
}
|
||||
}
|
||||
29
database/factories/ProjectFactory.php
Normal file
29
database/factories/ProjectFactory.php
Normal 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(),
|
||||
];
|
||||
}
|
||||
}
|
||||
28
database/factories/PublicationFactory.php
Normal file
28
database/factories/PublicationFactory.php
Normal 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(),
|
||||
];
|
||||
}
|
||||
}
|
||||
24
database/factories/ReferenceFactory.php
Normal file
24
database/factories/ReferenceFactory.php
Normal 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(),
|
||||
];
|
||||
}
|
||||
}
|
||||
31
database/factories/ResumeFactory.php
Normal file
31
database/factories/ResumeFactory.php
Normal 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(),
|
||||
];
|
||||
}
|
||||
}
|
||||
25
database/factories/SkillFactory.php
Normal file
25
database/factories/SkillFactory.php
Normal 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(),
|
||||
];
|
||||
}
|
||||
}
|
||||
44
database/factories/UserFactory.php
Normal file
44
database/factories/UserFactory.php
Normal 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,
|
||||
]);
|
||||
}
|
||||
}
|
||||
30
database/factories/VolunteerExperienceFactory.php
Normal file
30
database/factories/VolunteerExperienceFactory.php
Normal 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(),
|
||||
];
|
||||
}
|
||||
}
|
||||
30
database/factories/WorkExperienceFactory.php
Normal file
30
database/factories/WorkExperienceFactory.php
Normal 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(),
|
||||
];
|
||||
}
|
||||
}
|
||||
50
database/migrations/0001_01_01_000000_create_users_table.php
Normal file
50
database/migrations/0001_01_01_000000_create_users_table.php
Normal 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');
|
||||
}
|
||||
};
|
||||
36
database/migrations/0001_01_01_000001_create_cache_table.php
Normal file
36
database/migrations/0001_01_01_000001_create_cache_table.php
Normal 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');
|
||||
}
|
||||
};
|
||||
58
database/migrations/0001_01_01_000002_create_jobs_table.php
Normal file
58
database/migrations/0001_01_01_000002_create_jobs_table.php
Normal 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');
|
||||
}
|
||||
};
|
||||
@@ -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');
|
||||
}
|
||||
};
|
||||
@@ -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');
|
||||
}
|
||||
};
|
||||
@@ -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');
|
||||
}
|
||||
};
|
||||
@@ -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');
|
||||
}
|
||||
};
|
||||
@@ -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');
|
||||
}
|
||||
};
|
||||
@@ -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');
|
||||
}
|
||||
};
|
||||
@@ -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');
|
||||
}
|
||||
};
|
||||
@@ -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');
|
||||
}
|
||||
};
|
||||
@@ -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');
|
||||
}
|
||||
};
|
||||
@@ -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');
|
||||
}
|
||||
};
|
||||
@@ -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');
|
||||
}
|
||||
};
|
||||
@@ -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');
|
||||
}
|
||||
};
|
||||
@@ -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');
|
||||
}
|
||||
};
|
||||
@@ -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');
|
||||
}
|
||||
};
|
||||
14
database/seeders/DatabaseSeeder.php
Normal file
14
database/seeders/DatabaseSeeder.php
Normal 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
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user