Optimized ORM-Structure

This commit is contained in:
Kevin Frantz
2018-09-06 15:14:33 +02:00
parent 261b704017
commit a857f515d3
7 changed files with 95 additions and 52 deletions

View File

@@ -0,0 +1,25 @@
<?php
namespace App\Entity\Attribut;
/**
* This trait doesn't need an own interface because it's covered by symfony
* @author kevinfrantz
*
*/
trait UsernameAttribut{
/**
* @ORM\Column(type="string", length=25, unique=true)
*/
protected $username;
public function getUsername():string
{
return $this->username;
}
public function setUsernames(string $username):void{
$this->username = $username;
}
}