Files
backend/src/Entity/News.php
T
2026-05-28 19:54:31 +03:00

273 lines
6.0 KiB
PHP

<?php
namespace App\Entity;
use App\Repository\NewsRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
#[ORM\Entity(repositoryClass: NewsRepository::class)]
#[ORM\Table(name: 'news')]
#[ORM\Index(name: 'idx_news_region_id', columns: ['region_id'])]
#[ORM\Index(name: 'idx_news_active', columns: ['active'])]
class News
{
#[ORM\Id]
#[ORM\Column(type: Types::INTEGER)]
#[Groups(['news:read'])]
private ?int $id = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
#[Groups(['news:read', 'news:write'])]
private ?string $name = null;
#[ORM\Column(type: Types::BOOLEAN, nullable: true)]
#[Groups(['news:read', 'news:write'])]
private ?bool $active = null;
#[ORM\Column(name: 'region_id', type: Types::INTEGER, nullable: true)]
#[Groups(['news:read', 'news:write'])]
private ?int $regionId = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
#[Groups(['news:read', 'news:write'])]
private ?string $alias = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
#[Groups(['news:read', 'news:write'])]
private ?string $anons = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
#[Groups(['news:read', 'news:write'])]
private ?string $content = null;
#[ORM\Column(name: 'update_at', type: Types::DATETIME_MUTABLE, nullable: true)]
#[Groups(['news:read', 'news:write'])]
private ?\DateTimeInterface $updateAt = null;
#[ORM\Column(name: 'link_el_price', type: Types::TEXT, nullable: true)]
#[Groups(['news:read', 'news:write'])]
private ?string $linkElPrice = null;
#[ORM\Column(name: 'short_name', type: Types::TEXT, nullable: true)]
#[Groups(['news:read', 'news:write'])]
private ?string $shortName = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
#[Groups(['news:read', 'news:write'])]
private ?string $timer = null;
#[ORM\Column(name: 'timer_bg', type: Types::TEXT, nullable: true)]
#[Groups(['news:read', 'news:write'])]
private ?string $timerBg = null;
#[ORM\Column(name: 'form_order', type: 'jsonb', nullable: true)]
#[Groups(['news:read', 'news:write'])]
private ?array $formOrder = null;
#[ORM\Column(name: 'link_services', type: 'jsonb', nullable: true)]
#[Groups(['news:read', 'news:write'])]
private ?array $linkServices = null;
#[ORM\Column(name: 'link_staff', type: 'jsonb', nullable: true)]
#[Groups(['news:read', 'news:write'])]
private ?array $linkStaff = null;
#[ORM\Column(type: 'jsonb', nullable: true)]
#[Groups(['news:read', 'news:write'])]
private ?array $photos = null;
public function getId(): ?int
{
return $this->id;
}
public function setId(?int $id): self
{
$this->id = $id;
return $this;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(?string $name): self
{
$this->name = $name;
return $this;
}
public function getActive(): ?bool
{
return $this->active;
}
public function setActive(?bool $active): self
{
$this->active = $active;
return $this;
}
public function getRegionId(): ?int
{
return $this->regionId;
}
public function setRegionId(?int $regionId): self
{
$this->regionId = $regionId;
return $this;
}
public function getAlias(): ?string
{
return $this->alias;
}
public function setAlias(?string $alias): self
{
$this->alias = $alias;
return $this;
}
public function getAnons(): ?string
{
return $this->anons;
}
public function setAnons(?string $anons): self
{
$this->anons = $anons;
return $this;
}
public function getContent(): ?string
{
return $this->content;
}
public function setContent(?string $content): self
{
$this->content = $content;
return $this;
}
public function getUpdateAt(): ?\DateTimeInterface
{
return $this->updateAt;
}
public function setUpdateAt(?\DateTimeInterface $updateAt): self
{
$this->updateAt = $updateAt;
return $this;
}
public function getLinkElPrice(): ?string
{
return $this->linkElPrice;
}
public function setLinkElPrice(?string $linkElPrice): self
{
$this->linkElPrice = $linkElPrice;
return $this;
}
public function getShortName(): ?string
{
return $this->shortName;
}
public function setShortName(?string $shortName): self
{
$this->shortName = $shortName;
return $this;
}
public function getTimer(): ?string
{
return $this->timer;
}
public function setTimer(?string $timer): self
{
$this->timer = $timer;
return $this;
}
public function getTimerBg(): ?string
{
return $this->timerBg;
}
public function setTimerBg(?string $timerBg): self
{
$this->timerBg = $timerBg;
return $this;
}
public function getFormOrder(): ?array
{
return $this->formOrder;
}
public function setFormOrder(?array $formOrder): self
{
$this->formOrder = $formOrder;
return $this;
}
public function getLinkServices(): ?array
{
return $this->linkServices;
}
public function setLinkServices(?array $linkServices): self
{
$this->linkServices = $linkServices;
return $this;
}
public function getLinkStaff(): ?array
{
return $this->linkStaff;
}
public function setLinkStaff(?array $linkStaff): self
{
$this->linkStaff = $linkStaff;
return $this;
}
public function getPhotos(): ?array
{
return $this->photos;
}
public function setPhotos(?array $photos): self
{
$this->photos = $photos;
return $this;
}
}