update: add column and relations for model literacy generated text

This commit is contained in:
abiyasa05 2025-05-29 09:08:09 +07:00
parent 6e8728ebca
commit cfd6261fd4

View File

@ -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');
}
}