<?php
namespace App\Entity;
use App\Traits\PictureTrait;
use App\Traits\SortTrait;
use Doctrine\ORM\Mapping as ORM;
use Knp\DoctrineBehaviors\Contract\Entity\SoftDeletableInterface;
use Knp\DoctrineBehaviors\Contract\Entity\TimestampableInterface;
use Knp\DoctrineBehaviors\Contract\Entity\TranslatableInterface;
use Knp\DoctrineBehaviors\Model\SoftDeletable\SoftDeletableTrait;
use Knp\DoctrineBehaviors\Model\Timestampable\TimestampableTrait;
use Knp\DoctrineBehaviors\Model\Translatable\TranslatableTrait;
/**
* Activite
*
* @ORM\Table(name="app_activite")
* @ORM\Entity()
* @ORM\AssociationOverrides({
* @ORM\AssociationOverride(name="pictures",
* joinTable=@ORM\JoinTable(
* name="app_activite_pictures"
* ),
* joinColumns=@ORM\JoinColumn(
* name="activite_id", referencedColumnName="id"
* )
* )
* })
*/
class Activite implements TimestampableInterface, SoftDeletableInterface , TranslatableInterface
{
use TimestampableTrait,
SoftDeletableTrait,
SortTrait;
use TranslatableTrait,
PictureTrait;
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=Category::class, inversedBy="activites")
*/
private $category;
/**
*
* @ORM\Column(name="category_rea", type="string", nullable=true)
*/
private $category_rea;
/**
* Get id.
*
* @return int
*/
public function getId()
{
return $this->id;
}
public function getCategory(): ?Category
{
return $this->category;
}
public function setCategory(?Category $category): self
{
$this->category = $category;
return $this;
}
/**
* @return mixed
*/
public function getCategoryRea()
{
return $this->category_rea;
}
/**
* @param mixed $category_rea
*/
public function setCategoryRea($category_rea): void
{
$this->category_rea = $category_rea;
}
}