<?php
namespace Fourtwosix\StatusBundle\Entity;
use DateTime;
use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\Entity;
use Doctrine\ORM\Mapping\GeneratedValue;
use Doctrine\ORM\Mapping\Id;
#[Entity()]
class SchedulingEntity
{
#[Id]
#[GeneratedValue]
#[Column]
private int $id;
#[Column(length: 255)]
private string $name;
#[Column]
private int $maxHoursLastExecution;
#[Column]
private DateTime $lastStarted;
#[Column(nullable: true)]
private ?DateTime $lastFinished;
/**
* @return int
*/
public function getId(): int
{
return $this->id;
}
/**
* @param int $id
* @return SchedulingEntity
*/
public function setId(int $id): SchedulingEntity
{
$this->id = $id;
return $this;
}
/**
* @return string
*/
public function getName(): string
{
return $this->name;
}
/**
* @param string $name
* @return SchedulingEntity
*/
public function setName(string $name): SchedulingEntity
{
$this->name = $name;
return $this;
}
/**
* @return int
*/
public function getMaxHoursLastExecution(): int
{
return $this->maxHoursLastExecution;
}
/**
* @param int $maxHoursLastExecution
* @return SchedulingEntity
*/
public function setMaxHoursLastExecution(int $maxHoursLastExecution): SchedulingEntity
{
$this->maxHoursLastExecution = $maxHoursLastExecution;
return $this;
}
/**
* @return DateTime
*/
public function getLastStarted(): DateTime
{
return $this->lastStarted;
}
/**
* @param DateTime $lastStarted
* @return SchedulingEntity
*/
public function setLastStarted(DateTime $lastStarted): SchedulingEntity
{
$this->lastStarted = $lastStarted;
return $this;
}
/**
* @return ?DateTime
*/
public function getLastFinished(): ?DateTime
{
return $this->lastFinished;
}
/**
* @param ?DateTime $lastFinished
* @return SchedulingEntity
*/
public function setLastFinished(?DateTime $lastFinished): SchedulingEntity
{
$this->lastFinished = $lastFinished;
return $this;
}
}