20 lines
424 B
PHP
20 lines
424 B
PHP
|
<?php declare(strict_types=1);
|
||
|
|
||
|
namespace App\Repository;
|
||
|
|
||
|
use App\Entity\{Gpu, PreviouslyOwnedGpu};
|
||
|
|
||
|
class GpuRepository extends AcquireRepository {
|
||
|
public function deacquire(mixed $currentRecord): void
|
||
|
{
|
||
|
$currentRecord->setAcquired(TRUE);
|
||
|
|
||
|
$this->moveRecord($currentRecord, new PreviouslyOwnedGpu());
|
||
|
}
|
||
|
|
||
|
public function reacquire(mixed $currentRecord): void
|
||
|
{
|
||
|
$this->moveRecord($currentRecord, new Gpu());
|
||
|
}
|
||
|
}
|