src/Entity/Common/Link.php line 16
<?php
namespace App\Entity\Common;
use App\Entity\Traits\TrackerFields;
use App\Entity\Traits\UserCreatedInterface;
use App\Entity\Traits\UserUpdatedInterface;
use App\Model\Common\HaveOwnerInterface;
use App\Model\Common\OwnerInterface;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table(name: 'links')]
#[ORM\Index(name: 'idx_relation', columns: ['owner_uuid', 'deleted'])]
#[ORM\Entity(repositoryClass: 'App\Repository\Common\LinkRepository')]
#[ORM\HasLifecycleCallbacks]
class Link implements UserCreatedInterface, UserUpdatedInterface, HaveOwnerInterface
{
use TrackerFields;
/**
* @var int|null
*/
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
#[ORM\Column(type: 'integer')]
private $id;
/**
* @var string|null
*/
#[ORM\Column(type: 'string')]
private $caption;
/**
* @var string|null
*/
#[ORM\Column(type: 'string')]
private $url;
/**
* @var Owner
*/
#[ORM\Embedded(class: 'App\Entity\Common\Owner')]
private $owner;
public function __construct()
{
$this->owner = new Owner();
}
/**
* @return int|null
*/
public function getId(): ?int
{
return $this->id;
}
/**
* @param int|null $id
*/
public function setId(?int $id): void
{
$this->id = $id;
}
/**
* @return string|null
*/
public function getCaption(): ?string
{
return $this->caption;
}
/**
* @param string|null $caption
*/
public function setCaption(?string $caption): void
{
$this->caption = $caption;
}
/**
* @return string|null
*/
public function getUrl(): ?string
{
return $this->url;
}
/**
* @param string|null $url
*/
public function setUrl(?string $url): void
{
$this->url = $url;
}
/**
* @return Owner
*/
public function getOwner(): OwnerInterface
{
return $this->owner;
}
/**
* @param Owner $owner
*/
public function setOwner(Owner $owner): void
{
$this->owner = $owner;
}
}