diff options
author | Daniel Weipert <code@drogueronin.de> | 2022-01-14 18:21:36 +0100 |
---|---|---|
committer | Daniel Weipert <code@drogueronin.de> | 2022-01-14 18:21:36 +0100 |
commit | 4cacc94240944ff316104bfd1b5e8e00fad14517 (patch) | |
tree | 2559dc3aa121d70bd645ff0a2fe56e1ae0695daa /src/Model/VoteCard.php | |
parent | 9c0893cb65df986b9edf0f48a6d4d2d65f27b8ef (diff) |
Add Artworks, Votes and better routing
Diffstat (limited to 'src/Model/VoteCard.php')
-rw-r--r-- | src/Model/VoteCard.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/Model/VoteCard.php b/src/Model/VoteCard.php new file mode 100644 index 0000000..e9b3e60 --- /dev/null +++ b/src/Model/VoteCard.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_card')] +/** + * @Entity + * @Table(name="votes_card") + */ +class VoteCard extends Vote +{ + #[ManyToOne(targetEntity: Card::class, inversedBy: 'votes')] + /** + * @ManyToOne(targetEntity="Card", inversedBy="votes", cascade={"persist"}) + */ + public Card $card; +} + |