diff options
Diffstat (limited to 'src/Model/VoteArtwork.php')
-rw-r--r-- | src/Model/VoteArtwork.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/Model/VoteArtwork.php b/src/Model/VoteArtwork.php new file mode 100644 index 0000000..ee6ac8b --- /dev/null +++ b/src/Model/VoteArtwork.php @@ -0,0 +1,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; +} + |