mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-21 05:23:58 +00:00
28 lines
524 B
PHP
28 lines
524 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class QAQuestions extends AbstractModel
|
|
{
|
|
protected $table = 'qa_questions';
|
|
|
|
/**
|
|
* @return BelongsTo
|
|
*/
|
|
public function questionnaire(): BelongsTo
|
|
{
|
|
return $this->BelongsTo(QAQuestionnaireSet::class, 'questionnaire_set_id', 'id');
|
|
}
|
|
|
|
/**
|
|
* @return HasMany
|
|
*/
|
|
public function userAnswers()
|
|
{
|
|
return $this->hasMany(QAUserAnswerSelected::class, 'question_id', 'id');
|
|
}
|
|
}
|