Rajout de doctrine/orm
[zf2.biz/application_blanche.git] / vendor / doctrine / orm / tests / Doctrine / Tests / Models / Quote / Group.php
diff --git a/vendor/doctrine/orm/tests/Doctrine/Tests/Models/Quote/Group.php b/vendor/doctrine/orm/tests/Doctrine/Tests/Models/Quote/Group.php
new file mode 100644 (file)
index 0000000..c653b69
--- /dev/null
@@ -0,0 +1,42 @@
+<?php
+
+namespace Doctrine\Tests\Models\Quote;
+
+/**
+ * @Entity
+ * @Table(name="`quote-group`")
+ */
+class Group
+{
+
+    /**
+     * @Id
+     * @GeneratedValue
+     * @Column(type="integer", name="`group-id`")
+     */
+    public $id;
+
+    /**
+     * @Column(name="`group-name`")
+     */
+    public $name;
+
+    /**
+     * @var Group
+     *
+     * @ManyToOne(targetEntity="Group", cascade={"persist"})
+     * @JoinColumn(name="`parent-id`", referencedColumnName="`group-id`")
+     */
+    public $parent;
+
+    /**
+     * @ManyToMany(targetEntity="User", mappedBy="groups")
+     */
+    public $users;
+
+    public function __construct($name = null, Group $parent =  null)
+    {
+        $this->name     = $name;
+        $this->parent   = $parent;
+    }
+}
\ No newline at end of file