<?php

namespace Application\Model;

use Ainias\Core\Model\StandardModel;
use Doctrine\ORM\Mapping as ORM;

/** @ORM\Entity(repositoryClass="Application\Model\Repository\WordRepository")
 */
class Word extends StandardModel
{
    //Level:
    /*
     * Ansage
     * Termin
     *
     */

    CONST LANGUAGE_DE = 1;

    /**
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     * @ORM\Column(type="integer")
     */
    protected $id;

    /**
     * @ORM\Column(type="text")
     * @var string
     */
    protected $word;

    /**
     * @ORM\Column(type="datetime")
     * @var \DateTime
     */
    protected $created;

    /** @ORM\Column(type="datetime")
     * @var \DateTime
     */
    protected $lastUpdated;

    /**
     * @ORM\Column(type="boolean")
     * @var bool
     */
    protected $deleted;

    /**
     * @ORM\Column(type="integer")
     * @var int
     */
    protected $lang;

    /**
     * @ORM\Column(type="integer")
     * @var int
     */
    protected $checked;

    /**
     * @ORM\Column(type="boolean")
     * @var bool
     */
    protected $used;

    /**
     * Word constructor.
     */
    public function __construct()
    {
        $this->id = null;
        $this->created = new \DateTime();
        $this->lastUpdated = new \DateTime();
        $this->deleted = false;
        $this->lang = self::LANGUAGE_DE;
        $this->word = "";
        $this->checked = -1;
        $this->used = false;
    }

    /**
     * @return mixed
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * @param mixed $id
     */
    public function setId($id)
    {
        $this->id = $id;
    }

    /**
     * @return string
     */
    public function getWord()
    {
        return $this->word;
    }

    /**
     * @param string $word
     */
    public function setWord($word)
    {
        $this->word = $word;
    }

    /**
     * @return \DateTime
     */
    public function getCreated()
    {
        return $this->created;
    }

    /**
     * @param \DateTime $created
     */
    public function setCreated($created)
    {
        $this->created = $created;
    }

    /**
     * @return \DateTime
     */
    public function getLastUpdated()
    {
        return $this->lastUpdated;
    }

    /**
     * @param \DateTime $lastUpdated
     */
    public function setLastUpdated($lastUpdated)
    {
        $this->lastUpdated = $lastUpdated;
    }

    /**
     * @return boolean
     */
    public function isDeleted()
    {
        return $this->deleted;
    }

    /**
     * @param boolean $deleted
     */
    public function setDeleted($deleted)
    {
        $this->deleted = $deleted;
    }

    /**
     * @return int
     */
    public function getLang()
    {
        return $this->lang;
    }

    /**
     * @param int $lang
     */
    public function setLang($lang)
    {
        $this->lang = $lang;
    }

    /**
     * @return int
     */
    public function getChecked()
    {
        return $this->checked;
    }

    /**
     * @param int $checked
     */
    public function setChecked($checked)
    {
        $this->checked = $checked;
    }

    /**
     * @return bool
     */
    public function isUsed()
    {
        return $this->used;
    }

    /**
     * @param bool $used
     */
    public function setUsed($used)
    {
        $this->used = $used;
    }
}
