1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* This file is part of the Tinyissue package. |
5
|
|
|
* |
6
|
|
|
* (c) Mohamed Alsharaf <[email protected]> |
7
|
|
|
* |
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
9
|
|
|
* file that was distributed with this source code. |
10
|
|
|
*/ |
11
|
|
|
|
12
|
|
|
namespace Tinyissue\Model\Project\Issue; |
13
|
|
|
|
14
|
|
|
use Illuminate\Database\Eloquent\Collection; |
15
|
|
|
use Tinyissue\Model\Message\Queue; |
16
|
|
|
use Tinyissue\Model\ModelAbstract; |
17
|
|
|
use Tinyissue\Model\Project; |
18
|
|
|
use Tinyissue\Model\Project\Issue; |
19
|
|
|
use Tinyissue\Model\User; |
20
|
|
|
|
21
|
|
|
/** |
22
|
|
|
* Comment is model class for project issue comments. |
23
|
|
|
* |
24
|
|
|
* @author Mohamed Alsharaf <[email protected]> |
25
|
|
|
* |
26
|
|
|
* @property int $id |
27
|
|
|
* @property int $issue_id |
28
|
|
|
* @property int $project_id |
29
|
|
|
* @property string $comment |
30
|
|
|
* @property int $created_by |
31
|
|
|
* @property User $user |
32
|
|
|
* @property Issue $issue |
33
|
|
|
* @property Project $project |
34
|
|
|
* @property Collection $attachments |
35
|
|
|
* @property User\Activity $activity |
36
|
|
|
* @property Queue $messagesQueue |
37
|
|
|
*/ |
38
|
|
|
class Comment extends ModelAbstract |
39
|
|
|
{ |
40
|
|
|
use CommentRelations; |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* Timestamp enabled. |
44
|
|
|
* |
45
|
|
|
* @var bool |
46
|
|
|
*/ |
47
|
|
|
public $timestamps = true; |
48
|
|
|
|
49
|
|
|
/** |
50
|
|
|
* Name of database table. |
51
|
|
|
* |
52
|
|
|
* @var string |
53
|
|
|
*/ |
54
|
|
|
protected $table = 'projects_issues_comments'; |
55
|
|
|
|
56
|
|
|
/** |
57
|
|
|
* List of allowed columns to be used in $this->fill(). |
58
|
|
|
* |
59
|
|
|
* @var array |
60
|
|
|
*/ |
61
|
|
|
protected $fillable = [ |
62
|
|
|
'created_by', |
63
|
|
|
'project_id', |
64
|
|
|
'issue_id', |
65
|
|
|
'comment', |
66
|
|
|
]; |
67
|
|
|
|
68
|
|
|
/** |
69
|
|
|
* @param User|null $user |
70
|
|
|
* |
71
|
|
|
* @return \Tinyissue\Repository\Project\Issue\Comment\Updater |
72
|
|
|
*/ |
73
|
|
|
public function updater(User $user = null) |
74
|
|
|
{ |
75
|
|
|
return parent::updater($user); |
76
|
|
|
} |
77
|
|
|
} |
78
|
|
|
|