update: add column and relations for model literacy generated text
This commit is contained in:
parent
99e7b7b5f3
commit
61de4c56f5
|
|
@ -13,7 +13,12 @@ class LiteracyGeneratedText extends Model
|
|||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'material_id',
|
||||
'generate_text',
|
||||
'question_type',
|
||||
'question_count',
|
||||
'created_at',
|
||||
'updated_at'
|
||||
];
|
||||
|
||||
public function teacher()
|
||||
|
|
@ -21,4 +26,8 @@ public function teacher()
|
|||
return $this->belongsTo(\App\Models\User::class, 'user_id');
|
||||
}
|
||||
|
||||
public function material()
|
||||
{
|
||||
return $this->belongsTo(\App\Models\Literacy\LiteracyMaterial::class, 'material_id');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user