34 lines
624 B
PHP
34 lines
624 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class IssueComment extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'issue_id',
|
|
'user_id',
|
|
'comment_text',
|
|
'is_internal',
|
|
];
|
|
|
|
protected $casts = [
|
|
'is_internal' => 'boolean',
|
|
];
|
|
|
|
public function issue(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Issue::class);
|
|
}
|
|
|
|
public function user(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
}
|