Files
nette-vite/app/model/Database/Entity/Term.php
2022-03-12 16:25:30 +01:00

232 lines
4.2 KiB
PHP
Executable File

<?php
namespace App\Model\Database\Entity;
use App\Model\Database\Entity\Attributes\TId;
use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Proxy\Proxy;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Model\Database\Repository\TermRepository")
* @ORM\HasLifecycleCallbacks
* @ORM\Table(indexes={@ORM\Index(columns={"string1"}, flags={"fulltext"}),@ORM\Index(columns={"string2"}, flags={"fulltext"})})
*
* @property int $id
* @property String $string1
* @property String $string2
* @property Dictionary $dictionary
* @property mixed $pronunciations
* @property Suffix $suffix1
* @property Suffix $suffix2
* @property DictType $type
* @property int $order2
* @property String $member
*/
class Term extends AbstractEntity
{
use Tid;
public function __construct(Dictionary $dictionary, $string)
{
$this->dictionary = $dictionary;
$this->string1 = $string;
}
/**
* @ORM\ManyToOne(targetEntity="\App\Model\Database\Entity\Dictionary", inversedBy="terms",cascade={"persist", "remove" })
*/
protected $dictionary;
/**
* @ORM\Column(type="string")
*/
protected $string1;
/**
* @ORM\Column(type="string")
*/
protected $string2;
/**
* @ORM\ManyToOne(targetEntity="Suffix")
*/
protected $suffix1;
/**
* @ORM\ManyToOne(targetEntity="Suffix")
*/
protected $suffix2;
/**
* @ORM\ManyToOne(targetEntity="DictType")
*/
protected $type;
/**
* @ORM\ManyToMany(targetEntity="Pronunciation", inversedBy="terms")
* @ORM\JoinTable(name="terms_pronunciations")
* @var Collection&iterable<Pronunciation>
*/
protected Collection $pronunciations;
/**
* @ORM\Column(type="string",nullable=true)
*/
protected $member;
public function setMember($member)
{
$this->member = $member;
return $this;
}
public function getMember()
{
return $this->member;
}
/**
* @ORM\Column(type="smallint",nullable=true)
*/
protected $order2;
/**
* @ORM\Column(type="json_array",nullable=true)
*/
protected $flags;
public function getFlags()
{
return $this->flags;
}
public function setFlags($flags)
{
$this->flags = $flags;
return $this;
}
public function getOrder2()
{
return $this->order2;
}
public function setOrder2($order2)
{
$this->order2 = $order2;
return $this;
}
/**
* Get the value of string1
*/
public function getString1()
{
return $this->string1;
}
/**
* Set the value of string1
*
* @return self
*/
public function setString1($string1)
{
$this->string1 = $string1;
return $this;
}
/**
* Get the value of string2
*/
public function getString2()
{
return $this->string2;
}
/**
* Set the value of string2
*
* @return self
*/
public function setString2($string2)
{
$this->string2 = $string2;
return $this;
}
/**
* Get the value of suffix1
*/
public function getSuffix1()
{
return $this->suffix1;
}
/**
* Set the value of suffix1
*
* @return self
*/
public function setSuffix1($suffix1)
{
$this->suffix1 = $suffix1;
return $this;
}
/**
* Get the value of suffix2
*/
public function getSuffix2()
{
return $this->suffix2;
}
/**
* Set the value of suffix2
*
* @return self
*/
public function setSuffix2($suffix2)
{
$this->suffix2 = $suffix2;
return $this;
}
/**
* Get the value of type
*/
public function getType()
{
return $this->type;
}
/**
* Set the value of type
*
* @return self
*/
public function setType($type)
{
$this->type = $type;
return $this;
}
/**
* Get the value of pronunciations
*
* @return Collection&iterable<Pronunciation>
*/
public function getPronunciations()
{
return $this->pronunciations;
}
}