Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
composer.lock
.phpunit.result.cache
.DS_Store
openapi.json
openapi.json.backup
.claude/settings.local.json
openapi.json
20 changes: 11 additions & 9 deletions factories/ApproveFactory.php → factories/ActivityFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,30 @@
namespace Timatic\Factories;

use Carbon\Carbon;
use Timatic\Dto\Approve;
use Timatic\Dto\Activity;

class ApproveFactory extends Factory
class ActivityFactory extends Factory
{
protected function definition(): array
{
return [
'entryId' => $this->faker->uuid(),
'overtimeTypeId' => $this->faker->uuid(),
'sourceId' => $this->faker->uuid(),
'eventTypeId' => $this->faker->uuid(),
'customerId' => $this->faker->uuid(),
'ticketId' => $this->faker->uuid(),
'entrySuggestionId' => $this->faker->numberBetween(1, 1000),
'startedAt' => Carbon::now()->subDays($this->faker->numberBetween(0, 365)),
'endedAt' => Carbon::now()->subDays($this->faker->numberBetween(0, 365)),
'percentages' => $this->faker->word(),
'approvedAt' => Carbon::now()->subDays($this->faker->numberBetween(0, 365)),
'approvedByUserId' => $this->faker->uuid(),
'exportedAt' => Carbon::now()->subDays($this->faker->numberBetween(0, 365)),
'title' => $this->faker->sentence(),
'description' => $this->faker->sentence(),
'isInternal' => $this->faker->boolean(),
'createdAt' => Carbon::now()->subDays($this->faker->numberBetween(0, 365)),
'updatedAt' => Carbon::now()->subDays($this->faker->numberBetween(0, 365)),
];
}

protected function modelClass(): string
{
return Approve::class;
return Activity::class;
}
}
4 changes: 2 additions & 2 deletions factories/BudgetFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ protected function definition(): array
{
return [
'budgetTypeId' => $this->faker->uuid(),
'customerId' => $this->faker->uuid(),
'customerId' => $this->faker->numberBetween(1, 1000),
'showToCustomer' => $this->faker->boolean(),
'changeId' => $this->faker->uuid(),
'contractId' => $this->faker->uuid(),
Expand All @@ -27,7 +27,7 @@ protected function definition(): array
'renewalFrequency' => $this->faker->word(),
'createdAt' => Carbon::now()->subDays($this->faker->numberBetween(0, 365)),
'updatedAt' => Carbon::now()->subDays($this->faker->numberBetween(0, 365)),
'supervisorUserId' => $this->faker->uuid(),
'supervisorUserId' => $this->faker->numberBetween(1, 1000),
];
}

Expand Down
27 changes: 0 additions & 27 deletions factories/BudgetTimeSpentTotalFactory.php

This file was deleted.

4 changes: 2 additions & 2 deletions factories/BudgetTypeFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ protected function definition(): array
'title' => $this->faker->sentence(),
'isArchived' => $this->faker->boolean(),
'hasChangeTicket' => $this->faker->boolean(),
'renewalFrequencies' => $this->faker->word(),
'renewalFrequencies' => [],
'hasSupervisor' => $this->faker->boolean(),
'hasContractId' => $this->faker->uuid(),
'hasContractId' => $this->faker->boolean(),
'hasTotalPrice' => $this->faker->boolean(),
'ticketIsRequired' => $this->faker->boolean(),
'defaultTitle' => $this->faker->sentence(),
Expand Down
2 changes: 1 addition & 1 deletion factories/CustomerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ protected function definition(): array
'externalId' => $this->faker->uuid(),
'name' => $this->faker->name(),
'hourlyRate' => number_format($this->faker->randomFloat(2, 50, 150), 2, '.', ''),
'accountManagerUserId' => $this->faker->uuid(),
'accountManagerUserId' => $this->faker->numberBetween(1, 1000),
'createdAt' => Carbon::now()->subDays($this->faker->numberBetween(0, 365)),
'updatedAt' => Carbon::now()->subDays($this->faker->numberBetween(0, 365)),
];
Expand Down
25 changes: 0 additions & 25 deletions factories/DailyProgressFactory.php

This file was deleted.

12 changes: 6 additions & 6 deletions factories/EntryFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ protected function definition(): array
'ticketNumber' => $this->faker->word(),
'ticketTitle' => $this->faker->sentence(),
'ticketType' => $this->faker->word(),
'customerId' => $this->faker->uuid(),
'customerId' => $this->faker->numberBetween(1, 1000),
'customerName' => $this->faker->company(),
'hourlyRate' => number_format($this->faker->randomFloat(2, 50, 150), 2, '.', ''),
'hourlyRate' => $this->faker->randomFloat(2, 0, 1000),
'hadEmergencyShift' => $this->faker->boolean(),
'budgetId' => $this->faker->uuid(),
'isPaidPerHour' => $this->faker->boolean(),
'budgetId' => $this->faker->numberBetween(1, 1000),
'isPaidPerHour' => $this->faker->word(),
'minutesSpent' => $this->faker->numberBetween(15, 480),
'userId' => $this->faker->uuid(),
'userId' => $this->faker->numberBetween(1, 1000),
'userEmail' => $this->faker->safeEmail(),
'userFullName' => $this->faker->name(),
'createdByUserId' => $this->faker->uuid(),
'createdByUserId' => $this->faker->numberBetween(1, 1000),
'createdByUserEmail' => $this->faker->safeEmail(),
'createdByUserFullName' => $this->faker->company(),
'entryType' => $this->faker->word(),
Expand Down
4 changes: 2 additions & 2 deletions factories/EntrySuggestionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ protected function definition(): array
'ticketId' => $this->faker->uuid(),
'ticketNumber' => $this->faker->word(),
'customerId' => $this->faker->uuid(),
'userId' => $this->faker->uuid(),
'userId' => $this->faker->numberBetween(1, 1000),
'date' => $this->faker->word(),
'ticketTitle' => $this->faker->sentence(),
'ticketType' => $this->faker->word(),
'createdAt' => Carbon::now()->subDays($this->faker->numberBetween(0, 365)),
'updatedAt' => Carbon::now()->subDays($this->faker->numberBetween(0, 365)),
'budgetId' => $this->faker->uuid(),
'budgetId' => $this->faker->numberBetween(1, 1000),
];
}

Expand Down
6 changes: 3 additions & 3 deletions factories/EventFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ class EventFactory extends Factory
protected function definition(): array
{
return [
'userId' => $this->faker->uuid(),
'budgetId' => $this->faker->uuid(),
'userId' => $this->faker->numberBetween(1, 1000),
'budgetId' => $this->faker->numberBetween(1, 1000),
'ticketId' => $this->faker->uuid(),
'sourceId' => $this->faker->uuid(),
'ticketNumber' => $this->faker->word(),
Expand All @@ -26,7 +26,7 @@ protected function definition(): array
'endedAt' => Carbon::now()->subDays($this->faker->numberBetween(0, 365)),
'createdAt' => Carbon::now()->subDays($this->faker->numberBetween(0, 365)),
'updatedAt' => Carbon::now()->subDays($this->faker->numberBetween(0, 365)),
'isInternal' => $this->faker->word(),
'isInternal' => $this->faker->boolean(),
];
}

Expand Down
32 changes: 0 additions & 32 deletions factories/MarkAsExportedFactory.php

This file was deleted.

49 changes: 0 additions & 49 deletions factories/MarkAsInvoicedFactory.php

This file was deleted.

4 changes: 2 additions & 2 deletions factories/OvertimeFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ class OvertimeFactory extends Factory
protected function definition(): array
{
return [
'entryId' => $this->faker->uuid(),
'entryId' => $this->faker->numberBetween(1, 1000),
'overtimeTypeId' => $this->faker->uuid(),
'startedAt' => Carbon::now()->subDays($this->faker->numberBetween(0, 365)),
'endedAt' => Carbon::now()->subDays($this->faker->numberBetween(0, 365)),
'percentages' => $this->faker->word(),
'approvedAt' => Carbon::now()->subDays($this->faker->numberBetween(0, 365)),
'approvedByUserId' => $this->faker->uuid(),
'approvedByUserId' => $this->faker->numberBetween(1, 1000),
'exportedAt' => Carbon::now()->subDays($this->faker->numberBetween(0, 365)),
'createdAt' => Carbon::now()->subDays($this->faker->numberBetween(0, 365)),
'updatedAt' => Carbon::now()->subDays($this->faker->numberBetween(0, 365)),
Expand Down
22 changes: 22 additions & 0 deletions factories/OvertimeTypeFactory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

// auto-generated

namespace Timatic\Factories;

use Timatic\Dto\OvertimeType;

class OvertimeTypeFactory extends Factory
{
protected function definition(): array
{
return [
'title' => $this->faker->sentence(),
];
}

protected function modelClass(): string
{
return OvertimeType::class;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

namespace Timatic\Factories;

use Timatic\Dto\ExportMail;
use Timatic\Dto\Period;

class ExportMailFactory extends Factory
class PeriodFactory extends Factory
{
protected function definition(): array
{
Expand All @@ -16,6 +16,6 @@ protected function definition(): array

protected function modelClass(): string
{
return ExportMail::class;
return Period::class;
}
}
22 changes: 22 additions & 0 deletions factories/PermissionFactory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

// auto-generated

namespace Timatic\Factories;

use Timatic\Dto\Permission;

class PermissionFactory extends Factory
{
protected function definition(): array
{
return [
'values' => [],
];
}

protected function modelClass(): string
{
return Permission::class;
}
}
23 changes: 23 additions & 0 deletions factories/SourceFactory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

// auto-generated

namespace Timatic\Factories;

use Timatic\Dto\Source;

class SourceFactory extends Factory
{
protected function definition(): array
{
return [
'key' => $this->faker->word(),
'title' => $this->faker->sentence(),
];
}

protected function modelClass(): string
{
return Source::class;
}
}
Loading
Loading