Initial commit
This commit is contained in:
commit
c909d539bc
7178 files changed
+756624
No files matched your search
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class TeacherPayPeriod extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'teacher_id',
|
||||
'period_start',
|
||||
'period_end',
|
||||
'total',
|
||||
'status',
|
||||
];
|
||||
|
||||
/**
|
||||
* The teacher this pay period belongs to.
|
||||
*/
|
||||
public function teacher(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(TeacherProfile::class, 'teacher_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Each payable lesson included in this period.
|
||||
*/
|
||||
public function items(): HasMany
|
||||
{
|
||||
return $this->hasMany(TeacherPayItem::class, 'teacher_pay_period_id');
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user