<?php

namespace Lc\SovBundle\Doctrine\Extension;

use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;


trait SortableTrait
{
    /**
     * @var string
     * @ORM\Column(type="float")
     */
    protected $position = 0;

    /**
     * @return float
     */
    public function getPosition(): float
    {
        return $this->position;
    }

    /**
     * @param float $position
     * @return $this
     */
    public function setPosition(float $position): self
    {
        $this->position = $position;
        return $this;
    }

    public function clearPosition(): self
    {
        $this->position = null;
        return $this;
    }
}
