24 lines
544 B
PHP
24 lines
544 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Models;
|
||
|
|
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||
|
|
|
||
|
|
class ChoixQuestionQuiz extends Model
|
||
|
|
{
|
||
|
|
protected $table = 'choix_questions_quiz';
|
||
|
|
|
||
|
|
protected $fillable = ['question_quiz_id', 'texte', 'est_correct', 'ordre'];
|
||
|
|
|
||
|
|
protected $casts = [
|
||
|
|
'est_correct' => 'boolean',
|
||
|
|
];
|
||
|
|
|
||
|
|
/** @return BelongsTo<QuestionQuiz, $this> */
|
||
|
|
public function question(): BelongsTo
|
||
|
|
{
|
||
|
|
return $this->belongsTo(QuestionQuiz::class, 'question_quiz_id');
|
||
|
|
}
|
||
|
|
}
|