Skip to content

Commit e0a4699

Browse files
committed
Create Dependent and Suggester entities
1 parent e764646 commit e0a4699

File tree

2 files changed

+108
-0
lines changed

2 files changed

+108
-0
lines changed

src/Doctrine/Entity/Dependent.php

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?php
2+
3+
namespace CodedMonkey\Dirigent\Doctrine\Entity;
4+
5+
use Doctrine\ORM\Mapping as ORM;
6+
7+
#[ORM\Entity]
8+
class Dependent
9+
{
10+
#[ORM\Id, ORM\ManyToOne(targetEntity: Package::class), ORM\JoinColumn(nullable: false)]
11+
private ?Package $package = null;
12+
13+
#[ORM\Id, ORM\Column(length: 191)]
14+
private string $dependentPackageName;
15+
16+
#[ORM\Id, ORM\Column]
17+
private bool $dev;
18+
19+
public function getPackage(): ?Package
20+
{
21+
return $this->package;
22+
}
23+
24+
public function setPackage(Package $package): static
25+
{
26+
$this->package = $package;
27+
28+
return $this;
29+
}
30+
31+
public function getDependentPackageName(): string
32+
{
33+
return $this->dependentPackageName;
34+
}
35+
36+
public function setDependentPackageName(string $packageName): static
37+
{
38+
$this->dependentPackageName = $packageName;
39+
40+
return $this;
41+
}
42+
43+
public function isDev(): bool
44+
{
45+
return $this->dev;
46+
}
47+
48+
public function setDev(bool $dev): static
49+
{
50+
$this->dev = $dev;
51+
52+
return $this;
53+
}
54+
}

src/Doctrine/Entity/Suggester.php

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?php
2+
3+
namespace CodedMonkey\Dirigent\Doctrine\Entity;
4+
5+
use Doctrine\ORM\Mapping as ORM;
6+
7+
#[ORM\Entity]
8+
class Suggester
9+
{
10+
#[ORM\Id, ORM\ManyToOne(targetEntity: Package::class), ORM\JoinColumn(nullable: false)]
11+
private ?Package $package = null;
12+
13+
#[ORM\Id, ORM\Column(length: 191)]
14+
private string $suggestedPackageName;
15+
16+
#[ORM\Id, ORM\Column]
17+
private bool $dev;
18+
19+
public function getPackage(): ?Package
20+
{
21+
return $this->package;
22+
}
23+
24+
public function setPackage(Package $package): static
25+
{
26+
$this->package = $package;
27+
28+
return $this;
29+
}
30+
31+
public function getSuggestedPackageName(): string
32+
{
33+
return $this->suggestedPackageName;
34+
}
35+
36+
public function setSuggestedPackageName(string $packageName): static
37+
{
38+
$this->suggestedPackageName = $packageName;
39+
40+
return $this;
41+
}
42+
43+
public function isDev(): bool
44+
{
45+
return $this->dev;
46+
}
47+
48+
public function setDev(bool $dev): static
49+
{
50+
$this->dev = $dev;
51+
52+
return $this;
53+
}
54+
}

0 commit comments

Comments
 (0)