Rajout de doctrine/orm
[zf2.biz/galerie.git] / vendor / doctrine / orm / tests / Doctrine / Tests / Models / Global / GlobalNamespaceModel.php
1 <?php
2
3 /**
4  * @entity
5  * @table(name="articles")
6  */
7 class DoctrineGlobal_Article
8 {
9     /**
10      * @id
11      * @column(type="int")
12      */
13     protected $id;
14
15     /**
16      * @column(type="string")
17      */
18     protected $headline;
19
20     /**
21      * @column(type="text")
22      */
23     protected $text;
24
25     /**
26      * @ManyToMany(targetEntity="DoctrineGlobal_User")
27      * @JoinTable(name="author_articles",
28      *      joinColumns={@JoinColumn(name="article_id", referencedColumnName="id")},
29      *      inverseJoinColumns={@JoinColumn(name="author_id", referencedColumnName="id", unique=true)}
30      * )
31      */
32     protected $author;
33
34     /**
35      * @ManyToMany(targetEntity="\DoctrineGlobal_User")
36      * @JoinTable(name="editor_articles",
37      *      joinColumns={@JoinColumn(name="article_id", referencedColumnName="id")},
38      *      inverseJoinColumns={@JoinColumn(name="editor_id", referencedColumnName="id", unique=true)}
39      * )
40      */
41     protected $editor;
42 }
43
44 /**
45  * @Entity
46  * @Table(name="users")
47  */
48 class DoctrineGlobal_User
49 {
50     /**
51      * @Id
52      * @column(type="integer")
53      * @var int
54      */
55     private $id;
56
57     /**
58      * @column(type="string", length=64)
59      * @var string
60      */
61     private $username;
62
63     /**
64      * @column(type="string", length=128)
65      * @var string
66      */
67     private $email;
68 }