Two month of work
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class TimesheetEntry extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'timesheet_id',
|
||||
'date',
|
||||
'user_id',
|
||||
'description',
|
||||
'hours',
|
||||
'billed'
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'date' => 'datetime',
|
||||
'billed' => 'boolean',
|
||||
'hours' => 'float'
|
||||
];
|
||||
|
||||
public function timesheet(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Timesheet::class);
|
||||
}
|
||||
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user