43 lines
914 B
PHP
43 lines
914 B
PHP
<?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);
|
|
}
|
|
}
|