2024-02-19 18:55:44 +03:00
|
|
|
<?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',
|
2024-02-28 15:03:46 +03:00
|
|
|
'quota',
|
2024-02-19 18:55:44 +03:00
|
|
|
'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);
|
|
|
|
}
|
|
|
|
}
|