<?php

namespace AutoAdmin\Bundle\Media\Model\Library;

use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;

#[ORM\MappedSuperclass]
abstract class AbstractImageTranslatable extends AbstractFileTranslatable implements ImageMediaInterface
{
    #[ORM\Column(type: Types::INTEGER, nullable: true)]
    #[Groups(['media'])]
    protected ?int $width = null;

    #[ORM\Column(type: Types::INTEGER, nullable: true)]
    #[Groups(['media'])]
    protected ?int $height = null;

    public function getWidth(): ?int
    {
        return $this->width;
    }

    public function setWidth(?int $width): self
    {
        $this->width = $width;

        return $this;
    }

    public function getHeight(): ?int
    {
        return $this->height;
    }

    public function setHeight(?int $height): self
    {
        $this->height = $height;

        return $this;
    }
}
