-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
344 additions
and
88 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
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
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
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
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
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
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,66 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
|
||
namespace Odandb\DoctrineCiphersweetEncryptionBundle\Entity; | ||
|
||
use Doctrine\ORM\Mapping as ORM; | ||
|
||
trait IndexedEntityAttributeTrait | ||
{ | ||
#[ORM\Id] | ||
#[ORM\GeneratedValue] | ||
#[ORM\Column(type: 'string')] | ||
protected int $id; | ||
|
||
#[ORM\Column(type: 'string', length: 255)] | ||
protected string $fieldname; | ||
|
||
/** | ||
* onDeleteCascade -> If we delete $targetEntity, we need to delete cascade to the list EntityFilters | ||
*/ | ||
#[ORM\JoinColumn(name: 'target_entity_id', referencedColumnName: 'id', onDelete: 'CASCADE')] | ||
protected object $targetEntity; | ||
|
||
#[ORM\Column(type: 'string', length: 10)] | ||
protected string $indexBi; | ||
|
||
public function getId(): ?int | ||
{ | ||
return $this->id; | ||
} | ||
|
||
public function getFieldname(): string | ||
{ | ||
return $this->fieldname; | ||
} | ||
|
||
public function setFieldname(string $fieldname): self | ||
{ | ||
$this->fieldname = $fieldname; | ||
return $this; | ||
} | ||
|
||
public function getTargetEntity(): object | ||
{ | ||
return $this->targetEntity; | ||
} | ||
|
||
public function setTargetEntity(?object $targetEntity): self | ||
{ | ||
$this->targetEntity = $targetEntity; | ||
return $this; | ||
} | ||
|
||
public function getIndexBi(): string | ||
{ | ||
return $this->indexBi; | ||
} | ||
|
||
public function setIndexBi(string $indexBi): self | ||
{ | ||
$this->indexBi = $indexBi; | ||
return $this; | ||
} | ||
} |
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
Oops, something went wrong.