23 lines
407 B
PHP
23 lines
407 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App;
|
||
|
|
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
|
||
|
|
class Comment extends Model
|
||
|
|
{
|
||
|
|
protected $table = 'comments';
|
||
|
|
|
||
|
|
protected $fillable = ['workflow_document_id', 'user_id', 'comment', 'parent_id'];
|
||
|
|
|
||
|
|
public function user()
|
||
|
|
{
|
||
|
|
return $this->belongsTo(User::class);
|
||
|
|
}
|
||
|
|
|
||
|
|
public function document()
|
||
|
|
{
|
||
|
|
return $this->belongsTo(WorkflowDocument::class);
|
||
|
|
}
|
||
|
|
}
|