Rajout de doctrine/orm
[zf2.biz/application_blanche.git] / vendor / doctrine / orm / tests / Doctrine / Tests / Models / Forum / ForumUser.php
diff --git a/vendor/doctrine/orm/tests/Doctrine/Tests/Models/Forum/ForumUser.php b/vendor/doctrine/orm/tests/Doctrine/Tests/Models/Forum/ForumUser.php
new file mode 100644 (file)
index 0000000..3f3b5d9
--- /dev/null
@@ -0,0 +1,41 @@
+<?php
+
+namespace Doctrine\Tests\Models\Forum;
+
+/**
+ * @Entity
+ * @Table(name="forum_users")
+ */
+class ForumUser
+{
+    /**
+     * @Column(type="integer")
+     * @Id @GeneratedValue
+     */
+    public $id;
+    /**
+     * @Column(type="string", length=50)
+     */
+    public $username;
+    /**
+     * @OneToOne(targetEntity="ForumAvatar", cascade={"persist"})
+     * @JoinColumn(name="avatar_id", referencedColumnName="id")
+     */
+    public $avatar;
+
+    public function getId() {
+       return $this->id;
+    }
+
+    public function getUsername() {
+       return $this->username;
+    }
+
+    public function getAvatar() {
+       return $this->avatar;
+    }
+
+    public function setAvatar(ForumAvatar $avatar) {
+       $this->avatar = $avatar;
+    }
+}