add class progress and fix endpoints
This commit is contained in:
@@ -3,9 +3,11 @@
|
||||
namespace App\Models;
|
||||
|
||||
use App\Models\BaseModel;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
||||
class ClassProgressReport extends BaseModel
|
||||
{
|
||||
use HasFactory;
|
||||
protected $table = 'class_progress_reports';
|
||||
|
||||
// ✅ CI: useTimestamps = true (created_at/updated_at)
|
||||
@@ -48,7 +50,7 @@ class ClassProgressReport extends BaseModel
|
||||
/* Optional relationships */
|
||||
public function classSection()
|
||||
{
|
||||
return $this->belongsTo(ClassSection::class, 'class_section_id');
|
||||
return $this->belongsTo(ClassSection::class, 'class_section_id', 'class_section_id');
|
||||
}
|
||||
|
||||
public function teacher()
|
||||
@@ -60,4 +62,4 @@ class ClassProgressReport extends BaseModel
|
||||
{
|
||||
return $this->hasMany(ClassProgressAttachment::class, 'report_id');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user