summaryrefslogtreecommitdiff
path: root/src/Model/VoteCard.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Model/VoteCard.php')
-rw-r--r--src/Model/VoteCard.php26
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;
+}
+