
* wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * lint fixes * missing empty lines * translations * fix vue version * #134 - fixes * fix * fix * #134 - fix * fix * fix * #134 - added tests * #134 - fix to translations * #134 - tests * #134 - fix * Update database/factories/ResumeFactory.php Co-authored-by: Krzysztof Rewak <krzysztof.rewak@gmail.com> * #134 - fix * #134 - fix Co-authored-by: EwelinaLasowy <ewelina.lasowy@blumilk.pl> Co-authored-by: Krzysztof Rewak <krzysztof.rewak@gmail.com>
45 lines
1.0 KiB
PHP
45 lines
1.0 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Toby\Eloquent\Models;
|
|
|
|
use Database\Factories\ResumeFactory;
|
|
use Illuminate\Database\Eloquent\Casts\AsCollection;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Illuminate\Support\Collection;
|
|
|
|
/**
|
|
* @property int $id
|
|
* @property ?User $user
|
|
* @property string $name
|
|
* @property Collection $education
|
|
* @property Collection $languages
|
|
* @property Collection $technologies
|
|
* @property Collection $projects
|
|
*/
|
|
class Resume extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $guarded = [];
|
|
protected $casts = [
|
|
"education" => AsCollection::class,
|
|
"languages" => AsCollection::class,
|
|
"technologies" => AsCollection::class,
|
|
"projects" => AsCollection::class,
|
|
];
|
|
|
|
public function user(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
|
|
protected static function newFactory(): ResumeFactory
|
|
{
|
|
return ResumeFactory::new();
|
|
}
|
|
}
|