mirror of
https://github.com/dyzulk/trustlab-api.git
synced 2026-01-26 05:15:35 +07:00
41 lines
762 B
PHP
41 lines
762 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Concerns\HasUuids;
|
|
|
|
class TicketReply extends Model
|
|
{
|
|
use HasFactory, HasUuids;
|
|
|
|
protected $fillable = [
|
|
'ticket_id',
|
|
'user_id',
|
|
'message',
|
|
'attachment_path',
|
|
];
|
|
|
|
/**
|
|
* Get the ticket that owns the reply.
|
|
*/
|
|
public function ticket()
|
|
{
|
|
return $this->belongsTo(Ticket::class);
|
|
}
|
|
|
|
/**
|
|
* Get the user that wrote the reply.
|
|
*/
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
|
|
public function attachments()
|
|
{
|
|
return $this->hasMany(TicketAttachment::class);
|
|
}
|
|
}
|