Initial commit
This commit is contained in:
commit
c909d539bc
7178 files changed
+756624
No files matched your search
@@ -0,0 +1,33 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user