add was opened to bid

This commit is contained in:
Yisroel Baum 2025-11-19 21:47:48 +02:00
parent bc6e3e47fe
commit b33c6c909a
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
4 changed files with 15 additions and 1 deletions

View file

@ -8,6 +8,7 @@ class Bid
private ?string $id,
private int $freightOrderId,
private int $carrierId,
private bool $wasOpened,
) {}
public function getId(): ?string
@ -38,4 +39,14 @@ class Bid
}
return "https://freightquotes.com/bid/$id";
}
public function getWasOpened(): bool
{
return $this->wasOpened;
}
public function setWasOpened(bool $wasOpened): void
{
$this->wasOpened = $wasOpened;
}
}

View file

@ -71,6 +71,7 @@ class CreateFreightOrder
id: null,
freightOrderId: $freightOrderId,
carrierId: $carrierId,
wasOpened: false,
)
);
}

View file

@ -25,6 +25,7 @@ class FakeBidRepository implements BidRepository
$id,
$bid->getFreightOrderId(),
$bid->getCarrierId(),
$bid->getWasOpened(),
);
}
@ -36,6 +37,7 @@ class FakeBidRepository implements BidRepository
$id,
$bid->getFreightOrderId(),
$bid->getCarrierId(),
$bid->getWasOpened(),
);
}
}

View file

@ -10,7 +10,7 @@ class BidTest extends TestCase
public function test_bid_link_generated(): void
{
$bidId = '124e56abf82';
$bid = new Bid($bidId, 0, 0);
$bid = new Bid($bidId, 0, 0, false);
$this->assertEquals(
"https://freightquotes.com/bid/$bidId",
$bid->getBidLink()