update: add column and relations for model literacy generated text
This commit is contained in:
parent
6e8728ebca
commit
cfd6261fd4
|
|
@ -13,12 +13,21 @@ class LiteracyGeneratedText extends Model
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'user_id',
|
'user_id',
|
||||||
|
'material_id',
|
||||||
'generate_text',
|
'generate_text',
|
||||||
|
'question_type',
|
||||||
|
'question_count',
|
||||||
|
'created_at',
|
||||||
|
'updated_at'
|
||||||
];
|
];
|
||||||
|
|
||||||
public function teacher()
|
public function teacher()
|
||||||
{
|
{
|
||||||
return $this->belongsTo(\App\Models\User::class, 'user_id');
|
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