Rajout de doctrine/orm
[zf2.biz/application_blanche.git] / vendor / doctrine / orm / tests / Doctrine / Tests / Models / CMS / CmsComment.php
diff --git a/vendor/doctrine/orm/tests/Doctrine/Tests/Models/CMS/CmsComment.php b/vendor/doctrine/orm/tests/Doctrine/Tests/Models/CMS/CmsComment.php
new file mode 100644 (file)
index 0000000..3e23821
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+
+namespace Doctrine\Tests\Models\CMS;
+
+/**
+ * @Entity
+ * @Table(name="cms_comments")
+ */
+class CmsComment
+{
+    /**
+     * @Column(type="integer")
+     * @Id
+     * @GeneratedValue(strategy="AUTO")
+     */
+    public $id;
+    /**
+     * @Column(type="string", length=255)
+     */
+    public $topic;
+    /**
+     * @Column(type="string")
+     */
+    public $text;
+    /**
+     * @ManyToOne(targetEntity="CmsArticle", inversedBy="comments")
+     * @JoinColumn(name="article_id", referencedColumnName="id")
+     */
+    public $article;
+
+    public function setArticle(CmsArticle $article) {
+        $this->article = $article;
+    }
+
+    public function __toString() {
+        return __CLASS__."[id=".$this->id."]";
+    }
+}