Migrated endpoints from user to member; Renamed membership to member

This commit is contained in:
Constantin Graf
2024-05-13 19:50:50 +02:00
parent ba335b4f05
commit b2365e2778
64 changed files with 853 additions and 456 deletions

View File

@@ -24,7 +24,9 @@ use Korridor\LaravelComputedAttributes\ComputedAttributes;
* @property bool $billable
* @property array $tags
* @property string $user_id
* @property string $member_id
* @property-read User $user
* @property-read Member $member
* @property string $organization_id
* @property-read Organization $organization
* @property string|null $project_id
@@ -91,6 +93,14 @@ class TimeEntry extends Model
return $this->belongsTo(User::class, 'user_id');
}
/**
* @return BelongsTo<Member, TimeEntry>
*/
public function member(): BelongsTo
{
return $this->belongsTo(Member::class, 'member_id');
}
/**
* @return BelongsTo<Organization, TimeEntry>
*/