Added new entity draft

This commit is contained in:
Kevin Frantz
2018-09-13 14:39:03 +02:00
parent 0ee29d3456
commit 00965aab5c
23 changed files with 331 additions and 34 deletions

View File

@@ -0,0 +1,15 @@
<?php
namespace App\Entity\Attribut;
/**
*
* @author kevinfrantz
*
*/
interface BlacklistAttributInterface
{
public function setBlacklist(?bool $value): void;
public function getBlacklist(): ?bool;
}

View File

@@ -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;

View 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;
}
}

View 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;
}

View File

@@ -11,8 +11,6 @@ trait NodeAttribut
{
/**
* @var NodeInterface
* @ORM\OneToOne(targetEntity="Node",cascade={"persist", "remove"})
* @ORM\JoinColumn(name="node_id", referencedColumnName="id")
*/
protected $node;

View File

@@ -0,0 +1,15 @@
<?php
namespace Entity\Attribut;
/**
*
* @author kevinfrantz
*
*/
interface RightAttributInterface
{
public function setRight(string $right):void;
public function getRight():string;
}

View 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;
}
}

View 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;
}

View 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;
}
}

View File

@@ -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;
}

View File

@@ -0,0 +1,15 @@
<?php
namespace Entity\Attribut;
/**
*
* @author kevinfrantz
*
*/
interface WhitelistAttributInterface
{
public function setWhitelist(?bool $value): void;
public function getWhitelist(): ?bool;
}