mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-30 21:44:28 +02:00
Added some basic DB fields for the new project system
This commit is contained in:
parent
8ae4e9fe05
commit
0c7ec9f0c7
36 changed files with 281 additions and 130 deletions
|
@ -62,7 +62,7 @@ use function sprintf;
|
|||
* @ORM\DiscriminatorMap({
|
||||
* 0 = "CategoryParameter",
|
||||
* 1 = "CurrencyParameter",
|
||||
* 2 = "DeviceParameter",
|
||||
* 2 = "ProjectParameter",
|
||||
* 3 = "FootprintParameter",
|
||||
* 4 = "GroupParameter",
|
||||
* 5 = "ManufacturerParameter",
|
||||
|
|
|
@ -41,7 +41,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Entity\Parameters;
|
||||
|
||||
use App\Entity\Devices\Device;
|
||||
use App\Entity\ProjectSystem\Project;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||||
|
||||
|
@ -49,13 +49,13 @@ use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
|||
* @ORM\Entity(repositoryClass="App\Repository\ParameterRepository")
|
||||
* @UniqueEntity(fields={"name", "group", "element"})
|
||||
*/
|
||||
class DeviceParameter extends AbstractParameter
|
||||
class ProjectParameter extends AbstractParameter
|
||||
{
|
||||
public const ALLOWED_ELEMENT_CLASS = Device::class;
|
||||
public const ALLOWED_ELEMENT_CLASS = Project::class;
|
||||
|
||||
/**
|
||||
* @var Device the element this para is associated with
|
||||
* @ORM\ManyToOne(targetEntity="App\Entity\Devices\Device", inversedBy="parameters")
|
||||
* @var Project the element this para is associated with
|
||||
* @ORM\ManyToOne(targetEntity="App\Entity\ProjectSystem\Project", inversedBy="parameters")
|
||||
* @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE").
|
||||
*/
|
||||
protected $element;
|
Loading…
Add table
Add a link
Reference in a new issue