This repository has been archived on 2026-09-27. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
tutoring/app/Models/TeacherPayItem.php
T
2026-01-14 00:54:08 +00:00

34 lines
714 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class TeacherPayItem extends Model
{
protected $fillable = [
'teacher_pay_period_id',
'attendance_id',
'hours',
'rate',
'total',
];
/**
* The pay period this item belongs to.
*/
public function payPeriod(): BelongsTo
{
return $this->belongsTo(TeacherPayPeriod::class, 'teacher_pay_period_id');
}
/**
* The attendance record this payment item is based on.
*/
public function attendance(): BelongsTo
{
return $this->belongsTo(LessonAttendance::class, 'attendance_id');
}
}