applicant-site/app/Models/EntranceExamination.php

43 lines
914 B
PHP
Raw Permalink Normal View History

2024-02-19 10:51:20 +03:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
class EntranceExamination extends Model
{
use HasFactory;
protected $fillable = [
'direction_id',
'examination_type_id',
'subject_id',
'subject_type_id',
'scores',
'position',
];
public function examinationType(): BelongsTo
{
return $this->belongsTo(ExaminationType::class);
}
public function direction(): BelongsTo
{
return $this->belongsTo(Direction::class);
}
public function subject(): BelongsTo
{
return $this->belongsTo(Subject::class);
}
public function subjectType(): BelongsTo
{
return $this->belongsTo(SubjectType::class);
}
}