src/Entity/UserContentBlockHistory.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\UserContentBlockHistoryRepository;
  4. use App\Traits\CreatedUpdatedTrait;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use JMS\Serializer\Annotation as Serializer;
  7. /**
  8.  * @ORM\Table(name="v_user_content_block_history")
  9.  * @ORM\Entity(repositoryClass=UserContentBlockHistoryRepository::class)
  10.  */
  11. class UserContentBlockHistory
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\ManyToOne(targetEntity="App\Entity\User")
  21.      * @Serializer\Exclude()
  22.      */
  23.     private $user;
  24.     /**
  25.      * @var \App\Entity\ContentBlock
  26.      * @ORM\ManyToOne(targetEntity="App\Entity\ContentBlock")
  27.      * @Serializer\Type("Relation")
  28.      */
  29.     private $content;
  30.     use CreatedUpdatedTrait;
  31.     public function getId(): ?int
  32.     {
  33.         return $this->id;
  34.     }
  35.     /**
  36.      * @return mixed
  37.      */
  38.     public function getUser()
  39.     {
  40.         return $this->user;
  41.     }
  42.     /**
  43.      * @param mixed $user
  44.      */
  45.     public function setUser($user): void
  46.     {
  47.         $this->user $user;
  48.     }
  49.     /**
  50.      * @return ContentBlock
  51.      */
  52.     public function getContent(): ?ContentBlock
  53.     {
  54.         return $this->content;
  55.     }
  56.     /**
  57.      * @param ContentBlock $content
  58.      */
  59.     public function setContent(?ContentBlock $content): void
  60.     {
  61.         $this->content $content;
  62.     }
  63. }