feat: Initial commit for Saqel Platform architecture, backend, Docker, and documentation
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Database\Factories\ConceptFactory;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class Concept extends Model
|
||||
{
|
||||
/** @use HasFactory<ConceptFactory> */
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = ['subject_id', 'name', 'remedial_lesson_id'];
|
||||
|
||||
public function subject(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Subject::class);
|
||||
}
|
||||
|
||||
public function remedialLesson(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Lesson::class, 'remedial_lesson_id');
|
||||
}
|
||||
|
||||
public function questions(): HasMany
|
||||
{
|
||||
return $this->hasMany(Question::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user