Initial commit
This commit is contained in:
Executable
+90
@@ -0,0 +1,90 @@
|
||||
<?php
|
||||
|
||||
namespace JobLock;
|
||||
|
||||
use DateTime;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Entity, ORM\Table(name: 'job_locks')]
|
||||
class JobLock
|
||||
{
|
||||
#[ORM\Id, ORM\GeneratedValue(strategy: 'IDENTITY'), ORM\Column(type: 'bigint')]
|
||||
protected ?int $id = null;
|
||||
|
||||
|
||||
#[ORM\Column(type: 'string')]
|
||||
protected string $identifier;
|
||||
|
||||
|
||||
#[ORM\Column(type: 'datetime')]
|
||||
protected DateTime $acquired;
|
||||
|
||||
|
||||
#[ORM\Column(type: 'datetime', nullable: true)]
|
||||
protected ?DateTime $expires = null;
|
||||
|
||||
|
||||
#[ORM\Column(type: 'datetime', nullable: true)]
|
||||
protected ?DateTime $released = null;
|
||||
|
||||
|
||||
public function getId() : ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
|
||||
public function setId(?int $id) : void
|
||||
{
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
|
||||
public function getIdentifier() : string
|
||||
{
|
||||
return $this->identifier;
|
||||
}
|
||||
|
||||
|
||||
public function setIdentifier(string $identifier) : void
|
||||
{
|
||||
$this->identifier = $identifier;
|
||||
}
|
||||
|
||||
|
||||
public function getAcquired() : DateTime
|
||||
{
|
||||
return $this->acquired;
|
||||
}
|
||||
|
||||
|
||||
public function setAcquired(DateTime $acquired) : void
|
||||
{
|
||||
$this->acquired = $acquired;
|
||||
}
|
||||
|
||||
|
||||
public function getExpires() : ?DateTime
|
||||
{
|
||||
return $this->expires;
|
||||
}
|
||||
|
||||
|
||||
public function setExpires(?DateTime $expires) : void
|
||||
{
|
||||
$this->expires = $expires;
|
||||
}
|
||||
|
||||
|
||||
public function getReleased() : ?DateTime
|
||||
{
|
||||
return $this->released;
|
||||
}
|
||||
|
||||
|
||||
public function setReleased(?DateTime $released) : void
|
||||
{
|
||||
$this->released = $released;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user