mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-10 09:12:15 +01:00
Added client to time entries
This commit is contained in:
committed by
Constantin Graf
parent
2862033321
commit
ec239f20f2
@@ -31,6 +31,8 @@ use Korridor\LaravelComputedAttributes\ComputedAttributes;
|
||||
* @property-read Organization $organization
|
||||
* @property string|null $project_id
|
||||
* @property-read Project|null $project
|
||||
* @property string|null $client_id
|
||||
* @property-read Client|null $client
|
||||
* @property string|null $task_id
|
||||
* @property-read Task|null $task
|
||||
*
|
||||
@@ -124,4 +126,14 @@ class TimeEntry extends Model
|
||||
{
|
||||
return $this->belongsTo(Task::class, 'task_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* This relation can be reconstructed via the task relation. It is only here for performance reasons.
|
||||
*
|
||||
* @return BelongsTo<Client, TimeEntry>
|
||||
*/
|
||||
public function client(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Client::class, 'client_id');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user