This commit is contained in:
2022-01-16 22:48:42 +01:00
parent 1ead7f5741
commit c801608fe8
3 changed files with 21 additions and 15 deletions

View File

@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);
namespace App\Model\Database\Entity;
@@ -8,7 +8,9 @@ use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
/**
* @ORM\Entity
* @ORM\Entity(repositoryClass="App\Model\Database\Repository\DictionaryRepository")
* @ORM\Table(name="`dictionary`")
* @ORM\HasLifecycleCallbacks
*/
class Dictionary extends AbstractEntity
{
@@ -23,7 +25,7 @@ class Dictionary extends AbstractEntity
}
/**
* @ORM\OneToMany(targetEntity="App\Model\Database\Entity\Translation", mappedBy="dictionary", cascade={"persist"})
* @ORM\OneToMany(targetEntity="\App\Model\Database\Entity\Translation", mappedBy="dictionary", cascade={"persist"})
* @var Collection&iterable<Translation>
*/
protected Collection $translations;
@@ -35,13 +37,13 @@ class Dictionary extends AbstractEntity
/**
* @ORM\ManyToOne(targetEntity="Language", inversedBy="dictionaries1")
* @ORM\ManyToOne(targetEntity="\App\Model\Database\Entity\Language", inversedBy="dictionaries1")
* @ORM\JoinColumn(name="lang1_id", referencedColumnName="id")
*/
protected ?Language $lang1;
/**
* @ORM\ManyToOne(targetEntity="Language", inversedBy="dictionaries2")
* @ORM\ManyToOne(targetEntity="\App\Model\Database\Entity\Language", inversedBy="dictionaries2")
* @ORM\JoinColumn(name="lang2_id", referencedColumnName="id")
*/
protected ?Language $lang2;