You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
90 lines
1.5 KiB
90 lines
1.5 KiB
<?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;
|
|
}
|
|
}
|