58 lines
1.1 KiB
PHP
58 lines
1.1 KiB
PHP
<?php declare(strict_types = 1);
|
|
|
|
namespace App\Model\Database\Entity;
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
use App\Model\Database\Entity\Attributes\TId;
|
|
use Doctrine\Common\Collections\Collection;
|
|
|
|
/**
|
|
* @ORM\Entity
|
|
*/
|
|
class Language extends AbstractEntity
|
|
{
|
|
|
|
use Tid;
|
|
|
|
public function __construct($shortname,$name)
|
|
{
|
|
$this->shortName = $shortname;
|
|
$this->name = $name;
|
|
}
|
|
|
|
/**
|
|
* @ORM\Column(type="string",length=2, unique=true, options={"fixed" = true})
|
|
*/
|
|
protected $shortName;
|
|
|
|
public function getShortName()
|
|
{
|
|
return $this->shortName;
|
|
}
|
|
|
|
/**
|
|
* @ORM\Column(type="string",length=32)
|
|
*/
|
|
protected $name;
|
|
|
|
public function getName()
|
|
{
|
|
return $this->name;
|
|
}
|
|
|
|
/*
|
|
* @var Collection&iterable<Dictionary>
|
|
* @ORM\OneToMany(targetEntity="\App\Model\Database\Entity\Dictionary", mappedBy="language")
|
|
*/
|
|
protected Collection $dictionaries1;
|
|
|
|
/*
|
|
* @var Collection&iterable<Dictionary>
|
|
* @ORM\OneToMany(targetEntity="\App\Model\Database\Entity\Dictionary", mappedBy="language")
|
|
*/
|
|
protected Collection $dictionaries2;
|
|
|
|
}
|
|
|
|
?>
|