src/Entity/Profile/Avatar.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Profile;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @see Photo for inheritance mapping config
  6.  */
  7. #[ORM\Entity]
  8. class Avatar extends Photo
  9. {
  10.     #[ORM\JoinColumn(name: 'profile_id', referencedColumnName: 'id')]
  11.     #[ORM\ManyToOne(targetEntity: Profile::class, inversedBy: 'avatar')]
  12.     protected Profile $profile;
  13.     public function getType(): string {
  14.         return self::TYPE_AVATAR;
  15.     }
  16. }