mirror of
https://github.com/sigmasternchen/MyTube
synced 2025-03-15 12:58:54 +00:00
added constraint fields to VideoLink
This commit is contained in:
parent
9a782bf3aa
commit
9c6578f8a0
1 changed files with 41 additions and 6 deletions
|
@ -3,6 +3,7 @@
|
|||
namespace App\Entity;
|
||||
|
||||
use App\Repository\VideoLinkRepository;
|
||||
use DateTime;
|
||||
use DateTimeImmutable;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Ramsey\Uuid\Doctrine\UuidGenerator;
|
||||
|
@ -33,9 +34,21 @@ class VideoLink
|
|||
private $created;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="integer")
|
||||
* @ORM\Column(type="integer", nullable=true)
|
||||
*/
|
||||
private $mode = 0;
|
||||
private $maxViews;
|
||||
|
||||
/**
|
||||
* hours
|
||||
*
|
||||
* @ORM\Column(type="integer", nullable=true)
|
||||
*/
|
||||
private $viewableFor;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="datetime", nullable=true)
|
||||
*/
|
||||
private $viewableUntil;
|
||||
|
||||
public function getId(): ?UuidInterface
|
||||
{
|
||||
|
@ -66,15 +79,37 @@ class VideoLink
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function getMode(): ?int
|
||||
public function getMaxViews(): ?int
|
||||
{
|
||||
return $this->mode;
|
||||
return $this->maxViews;
|
||||
}
|
||||
|
||||
public function setMode(int $mode): self
|
||||
public function setMaxViews(int $maxViews): self
|
||||
{
|
||||
$this->mode = $mode;
|
||||
$this->maxViews = $maxViews;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getViewableUntil(): DateTime
|
||||
{
|
||||
return $this->viewableUntil;
|
||||
}
|
||||
|
||||
public function setViewableUntil($viewableUntil): self
|
||||
{
|
||||
$this->viewableUntil = $viewableUntil;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getViewableFor(): int
|
||||
{
|
||||
return $this->viewableFor;
|
||||
}
|
||||
|
||||
public function setViewableFor($viewableFor): self
|
||||
{
|
||||
$this->viewableFor = $viewableFor;
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue