<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table(name="brands__aliases")
* @ORM\Entity(repositoryClass="App\Repository\BrandAliasRepository")
*/
class BrandAlias
{
use IdTrait;
/**
* @ORM\Column(name="value", nullable=false, type="string", unique=true)
*/
private string $value;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Brand")
* @ORM\JoinColumn(name="brand_id", referencedColumnName="id", onDelete="CASCADE", nullable=false)
*/
private Brand $brand;
public function __construct(string $value, Brand $brand)
{
$this->value = $value;
$this->brand = $brand;
}
public function getValue(): string
{
return $this->value;
}
public function getBrand(): Brand
{
return $this->brand;
}
}