<?php
/**
 * Created by PhpStorm.
 * User: Olyanren
 * Date: 23.10.2016
 * Time: 21:06
 */

namespace AppBundle\Entity;

use DateTime;
use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\MappedSuperclass;
use Doctrine\ORM\Mapping as ORM;
/**
 * @MappedSuperclass
 * @package AppBundle\Entity
 */
class MappedSuperclassBase
{
    /**
     * @ORM\Column(type="integer",options={"default" : 0})
     */
    private $position=0;

    /**
     * @Column(type="datetime")
     */
    private $creationDate;

    /**
     * @Column(type="datetime")
     */
    private $updateDate;

    public function __construct()
    {
        $this->setCreationDate(new \DateTime());
        $this->setUpdateDate(new \DateTime());
    }



    /**
     * Set position
     *
     * @param integer $position
     *
     * @return MappedSuperclassBase
     */
    public function setPosition($position)
    {
        $this->position = $position;

        return $this;
    }

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

    /**
     * Set creationDate
     *
     * @param \DateTime $creationDate
     *
     * @return MappedSuperclassBase
     */
    public function setCreationDate($creationDate)
    {
        $this->creationDate = $creationDate;

        return $this;
    }

    /**
     * Get creationDate
     *
     * @return \DateTime
     */
    public function getCreationDate()
    {
        return $this->creationDate;
    }

    /**
     * Set updateDate
     *
     * @param \DateTime $updateDate
     *
     * @return MappedSuperclassBase
     */
    public function setUpdateDate($updateDate)
    {
        $this->updateDate = $updateDate;

        return $this;
    }

    /**
     * Get updateDate
     *
     * @return \DateTime
     */
    public function getUpdateDate()
    {
        return $this->updateDate;
    }
}
