forked from aslan/applicant-site
38 lines
748 B
PHP
38 lines
748 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Models;
|
||
|
|
||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||
|
use Illuminate\Database\Eloquent\Model;
|
||
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||
|
|
||
|
class Place extends Model
|
||
|
{
|
||
|
use HasFactory;
|
||
|
|
||
|
protected $fillable = [
|
||
|
'id',
|
||
|
'position',
|
||
|
'description',
|
||
|
'amount',
|
||
|
'education_form_id',
|
||
|
'place_type_id',
|
||
|
'direction_id',
|
||
|
];
|
||
|
|
||
|
public function direction(): BelongsTo
|
||
|
{
|
||
|
return $this->belongsTo(Direction::class);
|
||
|
}
|
||
|
|
||
|
public function placeType(): BelongsTo
|
||
|
{
|
||
|
return $this->belongsTo(PlaceType::class);
|
||
|
}
|
||
|
|
||
|
public function educationForm(): BelongsTo
|
||
|
{
|
||
|
return $this->belongsTo(EducationForm::class);
|
||
|
}
|
||
|
}
|