1 | <?php |
||
26 | trait RelationTrait |
||
27 | { |
||
28 | /** |
||
29 | * An issue has one user assigned to (inverse relationship of User::issues). |
||
30 | * |
||
31 | * @return Relations\BelongsTo |
||
32 | */ |
||
33 | public function assigned() |
||
37 | |||
38 | /** |
||
39 | * An issue has one user updated by (inverse relationship of User::issuesUpdatedBy). |
||
40 | * |
||
41 | * @return Relations\BelongsTo |
||
42 | */ |
||
43 | public function updatedBy() |
||
47 | |||
48 | /** |
||
49 | * An issue has one user closed it (inverse relationship of User::issuesClosedBy). |
||
50 | * |
||
51 | * @return Relations\BelongsTo |
||
52 | */ |
||
53 | public function closer() |
||
57 | |||
58 | /** |
||
59 | * An issue has one user created it (inverse relationship of User::issuesCreatedBy). |
||
60 | * |
||
61 | * @return Relations\BelongsTo |
||
62 | */ |
||
63 | public function user() |
||
67 | |||
68 | /** |
||
69 | * Issue belong to a project. |
||
70 | * |
||
71 | * @return Relations\BelongsTo |
||
72 | */ |
||
73 | public function project() |
||
77 | |||
78 | /** |
||
79 | * Issue can have many attachments. |
||
80 | * |
||
81 | * @return Relations\HasMany |
||
82 | */ |
||
83 | public function attachments() |
||
90 | 18 | ||
91 | 18 | /** |
|
92 | * Issue have many users activities. |
||
93 | * |
||
94 | * @return Relations\HasMany |
||
95 | */ |
||
96 | public function activities() |
||
102 | 28 | ||
103 | 28 | /** |
|
104 | * Issue have many tags. |
||
105 | * |
||
106 | * @return Relations\BelongsToMany |
||
107 | */ |
||
108 | public function tags() |
||
112 | |||
113 | /** |
||
114 | 1 | * Issue have many comments. |
|
115 | 1 | * |
|
116 | 1 | * @return Relations\HasMany |
|
117 | */ |
||
118 | public function comments() |
||
124 | } |
||
125 |