add class progress and fix endpoints

This commit is contained in:
root
2026-03-12 17:27:49 -04:00
parent 0f39dbee62
commit 33be0c9a0d
40 changed files with 2086 additions and 438 deletions
+4 -2
View File
@@ -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');
}
}
}