<?php
declare(strict_types=1);
namespace App\Entity;
use App\Entity\Traits\EntitySoftDeletableTrait;
use App\Entity\Traits\EntityTimestampableTrait;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation\SoftDeleteable;
use JMS\Serializer\Annotation\ExclusionPolicy;
/**
* @ORM\Table(name="page_news")
* @ORM\Entity(repositoryClass="App\Repository\PageNewsRepository")
* @SoftDeleteable(fieldName="deletedAt", timeAware=false, hardDelete=false)
* @ExclusionPolicy("all")
*/
class PageNews extends BaseDomain
{
use EntityTimestampableTrait;
use EntitySoftDeletableTrait;
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="News", inversedBy="news")
*/
private $news;
/**
* @ORM\ManyToOne(targetEntity="Page", inversedBy="icons")
*/
private $page;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $position;
public function __construct()
{
$this->position = 1;
}
/**
* @return mixed
*/
public function getId()
{
return $this->id;
}
/**
* @return mixed
*/
public function getPage()
{
return $this->page;
}
/**
* @param mixed $page
*/
public function setPage($page)
{
$this->page = $page;
}
/**
* @return int
*/
public function getPosition()
{
return $this->position;
}
/**
* @param int $position
*/
public function setPosition($position)
{
$this->position = $position;
}
/**
* @return mixed
*/
public function getNews()
{
return $this->news;
}
/**
* @param mixed $news
*/
public function setNews($news): void
{
$this->news = $news;
}
}