summaryrefslogtreecommitdiff
path: root/src/Model/VoteArtwork.php
blob: ee6ac8b2d1804d4506e117b329796d147dbff21a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php

namespace Elements\Model;

use Doctrine\DBAL\Schema\Column;
use Doctrine\DBAL\Schema\Table;
use Doctrine\ORM\Mapping\Entity;
use Doctrine\ORM\Mapping\GeneratedValue;
use Doctrine\ORM\Mapping\Id;
use Doctrine\ORM\Mapping\ManyToOne;

#[Entity]
#[Table(name: 'votes_artwork')]
/**
 * @Entity
 * @Table(name="votes_artwork")
 */
class VoteArtwork extends Vote
{
  #[ManyToOne(targetEntity: Artwork::class, inversedBy: 'votes')]
  /**
   * @ManyToOne(targetEntity="Artwork", inversedBy="votes", cascade={"persist"})
   */
  public Artwork $artwork;
}