src/Entity/Content/SMI/SmiItem.php line 22
<?php
namespace App\Entity\Content\SMI;
use App\Entity\Common\Owner;
use App\Entity\Traits\ActiveTrait;
use App\Entity\Traits\TrackerFields;
use App\Entity\Traits\UserCreatedInterface;
use App\Entity\Traits\UserUpdatedInterface;
use App\Entity\Traits\WeightTrait;
use App\Model\Common\HaveOwnerInterface;
use App\Model\Common\OwnerInterface;
use App\Model\Translation\TranslatableTrait;
use App\Repository\Content\SmiItemRepository;
use Doctrine\ORM\Mapping as ORM;
use Knp\DoctrineBehaviors\Contract\Entity\TranslatableInterface;
#[ORM\Table(name: 'smi_item')]
#[ORM\Entity(repositoryClass: SmiItemRepository::class)]
#[ORM\Index(fields: ["deleted", 'active', 'weight', 'publishAt'], name: 'idx_active')]
#[ORM\HasLifecycleCallbacks]
class SmiItem implements UserCreatedInterface, UserUpdatedInterface, HaveOwnerInterface, TranslatableInterface
{
public const SITE_PER_PAGE = 10;
use TrackerFields;
use WeightTrait;
use TranslatableTrait;
use ActiveTrait;
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
#[ORM\Column(type: 'integer')]
private ?int $id = null;
#[ORM\Column(type: 'string', nullable: true)]
private ?string $link = null;
#[ORM\Column(type: 'datetime_immutable', nullable: true)]
private ?\DateTimeImmutable $publishAt = null;
#[ORM\Embedded(class: \App\Entity\Common\Owner::class)]
private ?Owner $owner = null;
public function getOwner(): OwnerInterface
{
return $this->owner;
}
public function setOwner(?Owner $owner): void
{
$this->owner = $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 getLink(): ?string
{
return $this->link;
}
/**
* @param string|null $link
*/
public function setLink(?string $link): void
{
$this->link = $link;
}
/**
* @return \DateTimeImmutable|null
*/
public function getPublishAt(): ?\DateTimeImmutable
{
return $this->publishAt;
}
/**
* @param \DateTimeImmutable|null $publishAt
*/
public function setPublishAt(?\DateTimeImmutable $publishAt): void
{
$this->publishAt = $publishAt;
}
}