<?php
/**
* Base Attribute
*
* @author Vincent van Waasbergen <v.vanwaasbergen@visualmedia.nl>
*/
namespace VisualMedia\ProductBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use VisualMedia\LisaBundle\Component\Interfaces\EntityInterface;
use VisualMedia\LisaBundle\Traits\BlameableTrait;
use VisualMedia\LisaBundle\Traits\AutoIdTrait;
use VisualMedia\LisaBundle\Traits\TimestampableTrait;
use VisualMedia\ProductBundle\Model\BaseAttributeModel;
use VisualMedia\OrderingBundle\Traits\OrderingTrait;
/**
* Base Attribute
*
* @ORM\Entity(repositoryClass="VisualMedia\ProductBundle\Manager\BaseAttributeManager")
* @ORM\Table(name="attribute")
*
* @ORM\InheritanceType("SINGLE_TABLE")
* @ORM\DiscriminatorColumn(name="discriminator", type="string")
*/
class BaseAttribute extends BaseAttributeModel implements EntityInterface
{
use BlameableTrait;
use AutoIdTrait;
use OrderingTrait;
use TimestampableTrait;
/**
* @ORM\Column(name="title", type="string", length=255, nullable=false)
*/
public $title;
/**
* @ORM\Column(name="type", length=255, type="string", nullable=true)
*/
public $type;
/**
* @ORM\OneToMany(targetEntity="VisualMedia\ProductBundle\Entity\BaseAttributeOption", mappedBy="attribute", cascade={"all"}, orphanRemoval=true)
* @ORM\OrderBy({"title"="ASC"})
*/
protected $options;
/**
* @ORM\Column(name="multiple", type="boolean", nullable=false)
*/
public $multiple = false;
/**
* @ORM\Column(name="distinctive", type="boolean")
*/
public $distinctive = false;
/**
* @ORM\Column(name="filterable", type="boolean", nullable=false)
*/
public $filterable = false;
/**
* @ORM\Column(name="unit", type="string", length=32, nullable=true)
*/
public $unit;
/**
* @ORM\Column(name="visible", type="boolean")
*/
public $visible = true;
/**
* @ORM\Column(name="visible_in_category", type="boolean")
*/
public $visibleInCategory = false;
/**
* @ORM\ManyToMany(targetEntity="VisualMedia\ProductBundle\Entity\BaseAttributeSet", mappedBy="attributes")
*/
public $attributeSets;
/**
* @ORM\OneToMany(targetEntity="VisualMedia\ProductBundle\Entity\BaseAttributeContent", mappedBy="attribute")
*/
public $attributes;
/**
* @ORM\Column(name="empty", type="string", length=32, nullable=true)
*/
public $empty;
}