src/Entity/Activite.php line 32

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Traits\PictureTrait;
  4. use App\Traits\SortTrait;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Knp\DoctrineBehaviors\Contract\Entity\SoftDeletableInterface;
  7. use Knp\DoctrineBehaviors\Contract\Entity\TimestampableInterface;
  8. use Knp\DoctrineBehaviors\Contract\Entity\TranslatableInterface;
  9. use Knp\DoctrineBehaviors\Model\SoftDeletable\SoftDeletableTrait;
  10. use Knp\DoctrineBehaviors\Model\Timestampable\TimestampableTrait;
  11. use Knp\DoctrineBehaviors\Model\Translatable\TranslatableTrait;
  12. /**
  13.  * Activite
  14.  *
  15.  * @ORM\Table(name="app_activite")
  16.  * @ORM\Entity()
  17.  * @ORM\AssociationOverrides({
  18.  *      @ORM\AssociationOverride(name="pictures",
  19.  *          joinTable=@ORM\JoinTable(
  20.  *              name="app_activite_pictures"
  21.  *          ),
  22.  *          joinColumns=@ORM\JoinColumn(
  23.  *              name="activite_id", referencedColumnName="id"
  24.  *          )
  25.  *      )
  26.  * })
  27.  */
  28. class Activite implements TimestampableInterfaceSoftDeletableInterface TranslatableInterface
  29. {
  30.     use TimestampableTrait,
  31.         SoftDeletableTrait,
  32.         SortTrait;
  33.     
  34.     use TranslatableTrait,
  35.         PictureTrait;
  36.     
  37.     /**
  38.      * @var int
  39.      *
  40.      * @ORM\Column(name="id", type="integer")
  41.      * @ORM\Id
  42.      * @ORM\GeneratedValue(strategy="AUTO")
  43.      */
  44.     private $id;
  45.     /**
  46.      * @ORM\ManyToOne(targetEntity=Category::class, inversedBy="activites")
  47.      */
  48.     private $category;
  49.     /**
  50.     *
  51.     * @ORM\Column(name="category_rea", type="string", nullable=true)
  52.     */
  53.     private $category_rea;
  54.     /**
  55.      * Get id.
  56.      *
  57.      * @return int
  58.      */
  59.     public function getId()
  60.     {
  61.         return $this->id;
  62.     }
  63.     public function getCategory(): ?Category
  64.     {
  65.         return $this->category;
  66.     }
  67.     public function setCategory(?Category $category): self
  68.     {
  69.         $this->category $category;
  70.         return $this;
  71.     }
  72.     /**
  73.      * @return mixed
  74.      */
  75.     public function getCategoryRea()
  76.     {
  77.         return $this->category_rea;
  78.     }
  79.     /**
  80.      * @param mixed $category_rea
  81.      */
  82.     public function setCategoryRea($category_rea): void
  83.     {
  84.         $this->category_rea $category_rea;
  85.     }
  86. }