mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 00:02:15 +01:00
Added time entry api endpoints; Increased phpstan level; renamed to solidtime
This commit is contained in:
@@ -6,6 +6,7 @@ namespace Database\Factories;
|
||||
|
||||
use App\Models\Organization;
|
||||
use App\Models\Project;
|
||||
use App\Models\Tag;
|
||||
use App\Models\Task;
|
||||
use App\Models\TimeEntry;
|
||||
use App\Models\User;
|
||||
@@ -36,6 +37,18 @@ class TimeEntryFactory extends Factory
|
||||
];
|
||||
}
|
||||
|
||||
public function withTags(Organization $organization): self
|
||||
{
|
||||
return $this->state(function (array $attributes) use ($organization): array {
|
||||
return [
|
||||
'tags' => [
|
||||
Tag::factory()->forOrganization($organization)->create()->getKey(),
|
||||
Tag::factory()->forOrganization($organization)->create()->getKey(),
|
||||
],
|
||||
];
|
||||
});
|
||||
}
|
||||
|
||||
public function forUser(User $user): self
|
||||
{
|
||||
return $this->state(function (array $attributes) use ($user) {
|
||||
|
||||
Reference in New Issue
Block a user