API improvements (#1826)
This commit is contained in:
@@ -10,13 +10,21 @@
|
||||
namespace App\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use JMS\Serializer\Annotation as Serializer;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
trait ColorTrait
|
||||
{
|
||||
/**
|
||||
* The assigned color in HTML hex format, eg. #dd1d00
|
||||
*
|
||||
* @var string
|
||||
*
|
||||
* @Serializer\Expose()
|
||||
* @Serializer\Groups({"Default"})
|
||||
*
|
||||
* @ORM\Column(name="color", type="string", length=7, nullable=true)
|
||||
* @Assert\Length(min=4, max=7)
|
||||
*/
|
||||
private $color = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user