You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
671 B
33 lines
671 B
<?php
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class QuestionGroup extends Model
|
|
{
|
|
use SoftDeletes;
|
|
|
|
protected $table = 'se_question_groups';
|
|
|
|
protected $fillable = [
|
|
'content',
|
|
'content_vi',
|
|
'exercise_id',
|
|
'is_question_order_fixed',
|
|
'is_option_order_fixed',
|
|
'position',
|
|
'paragraph',
|
|
'media_object_id',
|
|
];
|
|
|
|
public function exercise()
|
|
{
|
|
return $this->belongsTo(Exercise::class, 'exercise_id');
|
|
}
|
|
|
|
public function questions()
|
|
{
|
|
return $this->hasMany(Question::class, 'group_id');
|
|
}
|
|
}
|
|
|