41 lines
821 B
PHP
41 lines
821 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class SubmissionComment extends Model
|
|
{
|
|
use HasFactory, SoftDeletes;
|
|
|
|
protected $fillable = [
|
|
'submission_id',
|
|
'user_id',
|
|
'body',
|
|
'is_internal',
|
|
'attachment_path',
|
|
'attachment_name',
|
|
'deleted_by',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'is_internal' => 'boolean',
|
|
];
|
|
}
|
|
|
|
public function submission(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Submission::class);
|
|
}
|
|
|
|
public function user(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
}
|