Files
sam-manage/app/Models/Interview/InterviewAnswer.php

45 lines
957 B
PHP
Raw Normal View History

<?php
namespace App\Models\Interview;
use App\Traits\BelongsToTenant;
use Illuminate\Database\Eloquent\Model;
class InterviewAnswer extends Model
{
use BelongsToTenant;
protected $fillable = [
'tenant_id',
'interview_session_id',
'interview_question_id',
'interview_template_id',
'is_checked',
'answer_text',
'answer_data',
'attachments',
'memo',
];
protected $casts = [
'is_checked' => 'boolean',
'answer_data' => 'array',
'attachments' => 'array',
];
public function session()
{
return $this->belongsTo(InterviewSession::class, 'interview_session_id');
}
public function question()
{
return $this->belongsTo(InterviewQuestion::class, 'interview_question_id');
}
public function template()
{
return $this->belongsTo(InterviewTemplate::class, 'interview_template_id');
}
}