forked from laravel-doctrine/orm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extracted EntityStub from FactoryBuilderTest
- Loading branch information
1 parent
8bff1c6
commit 0660369
Showing
2 changed files
with
33 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace LaravelDoctrineTest\ORM\Assets\Testing; | ||
|
||
use Doctrine\ORM\Mapping\Entity; | ||
use Doctrine\ORM\Mapping\Id; | ||
use Doctrine\ORM\Mapping\GeneratedValue; | ||
use Doctrine\ORM\Mapping\Column; | ||
use Doctrine\ORM\Mapping\JoinTable; | ||
use Doctrine\ORM\Mapping\JoinColumn; | ||
use Doctrine\ORM\Mapping\ManyToMany; | ||
use Doctrine\ORM\Mapping\InverseJoinColumn; | ||
|
||
#[Entity] | ||
class EntityStub | ||
{ | ||
#[Id] | ||
#[GeneratedValue] | ||
#[Column(type: "integer")] | ||
public $id; | ||
|
||
#[Column(type: "string")] | ||
public $name; | ||
|
||
#[ManyToMany(targetEntity: "EntityStub")] | ||
#[JoinTable(name: "stub_stubs")] | ||
#[JoinColumn(name: "owner_id", referencedColumnName: "id")] | ||
#[InverseJoinColumn(name: "owned_id", referencedColumnName: "id")] | ||
public $others; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters