<?php
namespace Modules\VisitorMessage\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Modules\User\Models\User;

class VisitorMessageReply extends Model
{
    protected $fillable = ['reply', 'visitor_email', 'user_id', 'visitor_message_id'];

    /**
     * Return message for multi replies
     * @return BelongsTo
     */
    public function visitorMessage() :BelongsTo
    {
        return $this->belongsTo(VisitorMessage::class);
    }
    public function user() :BelongsTo
    {
        return $this->belongsTo(User::class);
    }
}
