add was opened to bid
This commit is contained in:
parent
bc6e3e47fe
commit
b33c6c909a
4 changed files with 15 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ class CreateFreightOrder
|
|||
id: null,
|
||||
freightOrderId: $freightOrderId,
|
||||
carrierId: $carrierId,
|
||||
wasOpened: false,
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue