<?php
namespace App\Entity\System;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* Attribute
*
* @ORM\Table(name="ps_attribute")
*
* @ORM\Entity(repositoryClass="App\Repository\System\AttributeRepository")
*/
class Attribute
{
/**
* @var int
*
* @ORM\Column(name="id_attribute", type="integer")
*
* @ORM\Id
*/
private $id;
/**
* @var AttributeLang[]|ArrayCollection<int, AttributeLang>
*
* @ORM\OneToMany(targetEntity="App\Entity\System\AttributeLang", mappedBy="attribute", cascade={"persist"})
*/
private $attributeLangs;
/**
* @var AttributeGroup
*
* @ORM\ManyToOne(targetEntity="App\Entity\System\AttributeGroup", inversedBy="attributes")
*
* @ORM\JoinColumn(nullable=false, referencedColumnName="id_attribute_group", name="id_attribute_group")
*/
private $attributeGroup;
/**
* @var \DateTime
*
* @ORM\Column(type="datetime")
*/
private $dateAdd;
/**
* @var \DateTime
*
* @ORM\Column(type="datetime")
*/
private $dateUpd;
public function __construct()
{
$this->dateAdd = new \DateTime();
}
public function getId(): int
{
return $this->id;
}
public function setId(int $id): Attribute
{
$this->id = $id;
return $this;
}
/**
* @return AttributeLang[]|ArrayCollection<int, AttributeLang>
*/
public function getAttributeLangs()
{
return $this->attributeLangs;
}
/**
* @param Collection<string, AttributeLang> $attributeLangs
*/
public function setAttributeLangs(Collection $attributeLangs): Attribute
{
$this->attributeLangs = $attributeLangs;
return $this;
}
public function getAttributeGroup(): AttributeGroup
{
return $this->attributeGroup;
}
public function setAttributeGroup(AttributeGroup $attributeGroup): Attribute
{
$this->attributeGroup = $attributeGroup;
return $this;
}
public function getDateAdd(): \DateTime
{
return $this->dateAdd;
}
public function setDateAdd(\DateTime $dateAdd): Attribute
{
$this->dateAdd = $dateAdd;
return $this;
}
public function getDateUpd(): \DateTime
{
return $this->dateUpd;
}
public function setDateUpd(\DateTime $dateUpd): Attribute
{
$this->dateUpd = $dateUpd;
return $this;
}
}