refactor(ticket): remove service_date field and update validity time logic

This commit is contained in:
2026-08-06 16:05:08 -03:00
parent 448ffb4102
commit b224dd8650
12 changed files with 73 additions and 77 deletions

View File

@@ -5,7 +5,6 @@ namespace App\Domains\Ticket\Services;
use App\Domains\Auth\Models\User;
use App\Domains\Catalog\Models\CatalogItem;
use App\Domains\Catalog\Models\Variant;
use App\Domains\Ticket\Enums\ValidityTimeType;
use App\Domains\Ticket\Exceptions\TicketGenerationException;
use App\Domains\Ticket\Models\Ticket;
use App\Domains\Ticket\Models\ValidityTime;
@@ -53,9 +52,6 @@ class TicketGeneratorService
'source_catalog_item_id' => $item->getKey(),
'source_variant_id' => $variant?->getKey(),
'validity_time_id' => $validityTime?->getKey(),
'service_date' => $validityTime?->type === ValidityTimeType::ServiceDateWindow
? ($variant?->eventDate?->date ?? now($item->tenant->timezone)->toDateString())
: null,
'used_at' => null,
'user_id' => $user->getKey(),
]);