feat(ticket): add source IDs to tickets and update related services and tests

This commit is contained in:
2026-07-21 12:27:26 -03:00
parent c0978033c1
commit 38f74739da
6 changed files with 63 additions and 6 deletions

View File

@@ -21,6 +21,8 @@ class TicketTest extends TestCase
{
$ticket = new Ticket;
$ticket->setRawAttributes([
'source_catalog_item_id' => '20',
'source_variant_id' => '30',
'starts_at' => '2026-07-21 10:00:00',
'expires_at' => '2026-07-22 10:00:00',
'used_at' => null,
@@ -29,6 +31,8 @@ class TicketTest extends TestCase
$this->assertSame('tickets', $ticket->getTable());
$this->assertFalse($ticket->usesTimestamps());
$this->assertSame(20, $ticket->source_catalog_item_id);
$this->assertSame(30, $ticket->source_variant_id);
$this->assertInstanceOf(Carbon::class, $ticket->starts_at);
$this->assertInstanceOf(Carbon::class, $ticket->expires_at);
$this->assertNull($ticket->used_at);