Initial commit
This commit is contained in:
119
app/Models/Resume.php
Normal file
119
app/Models/Resume.php
Normal file
@@ -0,0 +1,119 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Models\Contracts\BelongsToUser;
|
||||
use App\Models\Traits\UserScopedModel;
|
||||
use Database\Factories\ResumeFactory;
|
||||
use Illuminate\Database\Eloquent\Concerns\HasUuids;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
final class Resume extends Model implements BelongsToUser
|
||||
{
|
||||
/** @use HasFactory<ResumeFactory> */
|
||||
use HasFactory;
|
||||
use HasUuids;
|
||||
use UserScopedModel;
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'name',
|
||||
'label',
|
||||
'email',
|
||||
'phone',
|
||||
'url',
|
||||
'address',
|
||||
'postal_code',
|
||||
'city',
|
||||
'country_code',
|
||||
'region',
|
||||
];
|
||||
|
||||
public function getUserColumnId(): string
|
||||
{
|
||||
return 'user_id';
|
||||
}
|
||||
|
||||
/** @return BelongsTo<User, $this> */
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
/** @return HasMany<Profile, $this> */
|
||||
public function profiles(): HasMany
|
||||
{
|
||||
return $this->hasMany(Profile::class);
|
||||
}
|
||||
|
||||
/** @return HasMany<WorkExperience, $this> */
|
||||
public function workExperiences(): HasMany
|
||||
{
|
||||
return $this->hasMany(WorkExperience::class);
|
||||
}
|
||||
|
||||
/** @return HasMany<Language, $this> */
|
||||
public function languages(): HasMany
|
||||
{
|
||||
return $this->hasMany(Language::class);
|
||||
}
|
||||
|
||||
/** @return HasMany<Education, $this> */
|
||||
public function educations(): HasMany
|
||||
{
|
||||
return $this->hasMany(Education::class);
|
||||
}
|
||||
|
||||
/** @return HasMany<Skill, $this> */
|
||||
public function skills(): HasMany
|
||||
{
|
||||
return $this->hasMany(Skill::class);
|
||||
}
|
||||
|
||||
/** @return HasMany<VolunteerExperience, $this> */
|
||||
public function volunteerExperiences(): HasMany
|
||||
{
|
||||
return $this->hasMany(VolunteerExperience::class);
|
||||
}
|
||||
|
||||
/** @return HasMany<Interest, $this> */
|
||||
public function interests(): HasMany
|
||||
{
|
||||
return $this->hasMany(Interest::class);
|
||||
}
|
||||
|
||||
/** @return HasMany<Award, $this> */
|
||||
public function awards(): HasMany
|
||||
{
|
||||
return $this->hasMany(Award::class);
|
||||
}
|
||||
|
||||
/** @return HasMany<Certificate, $this> */
|
||||
public function certificates(): HasMany
|
||||
{
|
||||
return $this->hasMany(Certificate::class);
|
||||
}
|
||||
|
||||
/** @return HasMany<Publication, $this> */
|
||||
public function publications(): HasMany
|
||||
{
|
||||
return $this->hasMany(Publication::class);
|
||||
}
|
||||
|
||||
/** @return HasMany<Reference, $this> */
|
||||
public function references(): HasMany
|
||||
{
|
||||
return $this->hasMany(Reference::class);
|
||||
}
|
||||
|
||||
/** @return HasMany<Project, $this> */
|
||||
public function projects(): HasMany
|
||||
{
|
||||
return $this->hasMany(Project::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user