<?php


namespace AutoAdmin\Bundle\Seo\Entity;

use AutoAdmin\Bundle\Content\Entity\AbstractUntranslated;
use Doctrine\DBAL\Types\Types;
use AutoAdmin\Bundle\Content\Entity\Interfaces\RedirectInterface;
use Doctrine\ORM\Mapping as ORM;

#[ORM\Entity(repositoryClass: 'AutoAdmin\Bundle\Seo\Repository\RedirectRepository')]
class Redirect extends AbstractUntranslated
{
    #[ORM\Column(name: 'origin', type: Types::STRING, length: 255)]
    protected string $origin;

    #[ORM\Column(name: 'destination', type: Types::STRING, length: 255)]
    protected string $destination;

    #[ORM\Column(name: 'type', type: Types::INTEGER)]
    protected int $type;

    #[ORM\Column(name: 'counter', type: Types::INTEGER)]
    protected int $counter = 0;

    public function getOrigin(): ?string
    {
        return $this->origin;
    }

    public function setOrigin(?string $origin): self
    {
        $this->origin = $origin;

        return $this;
    }

    public function getDestination(): ?string
    {
        return $this->destination;
    }

    public function setDestination(?string $destination): self
    {
        $this->destination = $destination;

        return $this;
    }

    public function getType(): ?int
    {
        return $this->type;
    }

    public function setType(?int $type): self
    {
        $this->type = $type;

        return $this;
    }

    public function getCounter(): ?int
    {
        return $this->counter;
    }

    public function setCounter(?int $counter): self
    {
        $this->counter = $counter;

        return $this;
    }
}
