Files
go-no-go/app/Models/ScreeningAnswer.php

40 lines
757 B
PHP

<?php
declare(strict_types=1);
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
final class ScreeningAnswer extends Model
{
/**
* Fillable attributes for mass assignment.
*/
protected $fillable = [
'screening_id',
'question_number',
'value',
];
/**
* Cast attributes to specific types.
*/
protected function casts(): array
{
return [
'screening_id' => 'integer',
'question_number' => 'integer',
];
}
/**
* Get the screening that owns this answer.
*/
public function screening(): BelongsTo
{
return $this->belongsTo(Screening::class);
}
}