This commit is contained in:
2022-01-13 18:41:03 +01:00
commit 0fb9f639da
159 changed files with 13183 additions and 0 deletions

View File

@@ -0,0 +1,76 @@
<?php
namespace App\Model\Database\Entity;
use Doctrine\ORM\Mapping as ORM;
use App\Model\Database\Entity\Attributes\TId;
/**
* @ORM\Entity
*/
class Dictionary extends AbstractEntity
{
use Tid;
public function __construct($name,$fullname)
{
$this->name = $name;
$this->fullName = $fullname;
$this->translations = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* @ORM\OneToMany(targetEntity="App\Model\Database\Entity\Translation", mappedBy="dictionary", cascade={"persist"})
* @var Article[]|\Doctrine\Common\Collections\ArrayCollection
*/
protected $translations;
public function getTranslations()
{
return $this->translations;
}
/**
* @ORM\ManyToOne(targetEntity="Language", inversedBy="lang1_dicionaries")
*/
protected $lang1;
/**
* @ORM\ManyToOne(targetEntity="Language", inversedBy="lang2_dicionaries")
*/
protected $lang2;
/**
* @ORM\Column(type="string")
*/
protected $name;
public function getName()
{
return $this->name;
}
/**
* @ORM\Column(type="string")
*/
protected $fullName;
public function setLang1($lang1)
{
$this->lang1 = $lang1;
return $this;
}
public function setLang2($lang2)
{
$this->lang2 = $lang2;
return $this;
}
}
?>