<?php

namespace Lc\ShopBundle\Model;

use Doctrine\ORM\Mapping as ORM;
use Lc\ShopBundle\Model\AbstractEntity;

/**
 * @ORM\MappedSuperclass
 */
abstract class Unit extends AbstractEntity
{
        /**
         * @ORM\Column(type="string", length=32)
         */
        protected $unit;

        /**
         * @ORM\Column(type="string", length=32)
         */
        protected $wording;

        /**
         * @ORM\Column(type="string", length=32)
         */
        protected $wordingUnit;

        /**
         * @ORM\Column(type="string", length=32)
         */
        protected $wordingShort;

        /**
         * @ORM\Column(type="integer")
         */
        protected $coefficient;

        /**
         * @ORM\ManyToOne(targetEntity="App\Entity\Unit")
         * @ORM\JoinColumn(nullable=true)
         */
        protected $unitReference;

        public function __toString()
        {
                return $this->getWording() ;
        }

        public function getUnit(): ?string
        {
                return $this->unit;
        }

        public function setUnit(string $unit): self
        {
                $this->unit = $unit;

                return $this;
        }

        public function getWording(): ?string
        {
                return $this->wording;
        }

        public function setWording(string $wording): self
        {
                $this->wording = $wording;

                return $this;
        }

        public function getWordingUnit(): ?string
        {
                return $this->wordingUnit;
        }

        public function setWordingUnit(string $wordingUnit): self
        {
                $this->wordingUnit = $wordingUnit;

                return $this;
        }

        public function getWordingShort(): ?string
        {
                return $this->wordingShort;
        }

        public function setWordingShort(string $wordingShort): self
        {
                $this->wordingShort = $wordingShort;

                return $this;
        }

        public function getCoefficient(): ?int
        {
                return $this->coefficient;
        }

        public function setCoefficient(int $coefficient): self
        {
                $this->coefficient = $coefficient;

                return $this;
        }

        public function getUnitReference(): ?self
        {
                return $this->unitReference;
        }

        public function setUnitReference(?self $unitReference): self
        {
                $this->unitReference = $unitReference;

                return $this;
        }
}