mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-14 06:07:18 +02:00
Added new entity draft
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
namespace App\Entity\Attribut;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*
|
||||
*/
|
||||
interface BlacklistAttributInterface
|
||||
{
|
||||
public function setBlacklist(?bool $value): void;
|
||||
|
||||
public function getBlacklist(): ?bool;
|
||||
}
|
||||
|
@@ -2,17 +2,13 @@
|
||||
|
||||
namespace App\Entity\Attribut;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
trait IdAttribut
|
||||
{
|
||||
/**
|
||||
* @ORM\Id()
|
||||
* @ORM\GeneratedValue
|
||||
* @ORM\Column(type="integer")(strategy="AUTO")
|
||||
* @var int
|
||||
*/
|
||||
protected $id;
|
||||
|
||||
|
26
application/src/Entity/Attribut/LawAttribut.php
Normal file
26
application/src/Entity/Attribut/LawAttribut.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
namespace App\Entity\Attribut;
|
||||
|
||||
use App\Entity\LawInterface;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*
|
||||
*/
|
||||
trait LawAttribut {
|
||||
|
||||
/**
|
||||
* @var LawInterface
|
||||
*/
|
||||
protected $law;
|
||||
|
||||
public function setLaw(LawInterface $law):void{
|
||||
$this->law = $law;
|
||||
}
|
||||
|
||||
public function getLaw(): LawInterface{
|
||||
return $this->law;
|
||||
}
|
||||
}
|
||||
|
18
application/src/Entity/Attribut/LawAttributInterface.php
Normal file
18
application/src/Entity/Attribut/LawAttributInterface.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
namespace App\Entity\Attribut;
|
||||
|
||||
use App\Entity\LawInterface;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*
|
||||
*/
|
||||
interface LawAttributInterface
|
||||
{
|
||||
|
||||
public function setLaw(LawInterface $law):void;
|
||||
|
||||
public function getLaw(): LawInterface;
|
||||
}
|
||||
|
@@ -11,8 +11,6 @@ trait NodeAttribut
|
||||
{
|
||||
/**
|
||||
* @var NodeInterface
|
||||
* @ORM\OneToOne(targetEntity="Node",cascade={"persist", "remove"})
|
||||
* @ORM\JoinColumn(name="node_id", referencedColumnName="id")
|
||||
*/
|
||||
protected $node;
|
||||
|
||||
|
15
application/src/Entity/Attribut/RightAttributInterface.php
Normal file
15
application/src/Entity/Attribut/RightAttributInterface.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
namespace Entity\Attribut;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*
|
||||
*/
|
||||
interface RightAttributInterface
|
||||
{
|
||||
public function setRight(string $right):void;
|
||||
|
||||
public function getRight():string;
|
||||
}
|
||||
|
26
application/src/Entity/Attribut/UserAttribut.php
Normal file
26
application/src/Entity/Attribut/UserAttribut.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
namespace App\Entity\Attribut;
|
||||
|
||||
use App\Entity\User;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*
|
||||
*/
|
||||
trait UserAttribut {
|
||||
|
||||
/**
|
||||
* @var User
|
||||
*/
|
||||
protected $user;
|
||||
|
||||
public function setUser(User $user):void{
|
||||
$this->user = $user;
|
||||
}
|
||||
|
||||
public function getUser():User{
|
||||
return $this->user;
|
||||
}
|
||||
}
|
||||
|
17
application/src/Entity/Attribut/UserAttributInterface.php
Normal file
17
application/src/Entity/Attribut/UserAttributInterface.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
namespace App\Entity\Attribut;
|
||||
|
||||
use App\Entity\User;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*
|
||||
*/
|
||||
interface UserAttributInterface
|
||||
{
|
||||
public function setUser(User $user):void;
|
||||
|
||||
public function getUser():User;
|
||||
}
|
||||
|
28
application/src/Entity/Attribut/UserSourceAttribut.php
Normal file
28
application/src/Entity/Attribut/UserSourceAttribut.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
namespace Entity\Attribut;
|
||||
|
||||
use App\Entity\UserSourceInterface;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*
|
||||
*/
|
||||
trait UserSource {
|
||||
/**
|
||||
*
|
||||
* @var UserSourceInterface
|
||||
* @ORM\OneToOne(targetEntity="UserSource",cascade={"persist", "remove"})
|
||||
* @ORM\JoinColumn(name="source_user_id", referencedColumnName="id")
|
||||
*/
|
||||
protected $userSource;
|
||||
|
||||
public function setUserSource(UserSourceInterface $userSource):void{
|
||||
$this->user = $userSource;
|
||||
}
|
||||
|
||||
public function getUserSource():UserSourceInterface{
|
||||
return $this->userSource;
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
namespace Entity\Attribut;
|
||||
|
||||
use App\Entity\UserSourceInterface;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*
|
||||
*/
|
||||
interface UserSourceAttributInterface
|
||||
{
|
||||
public function setUserSource(UserSourceInterface $user):void;
|
||||
|
||||
public function getUserSource():UserSourceInterface;
|
||||
}
|
||||
|
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
namespace Entity\Attribut;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*
|
||||
*/
|
||||
interface WhitelistAttributInterface
|
||||
{
|
||||
public function setWhitelist(?bool $value): void;
|
||||
|
||||
public function getWhitelist(): ?bool;
|
||||
}
|
||||
|
Reference in New Issue
Block a user