<?php

namespace App;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * @property mixed replies
 */
class VisitorMessage extends Model
{
    //use soft delete
    use SoftDeletes;

    protected $fillable = [
        'name',
        'email',
        'phone',
        'subject',
        'message',
        'reply',
        'read',
    ];


    /**
     * Return all replies for message
     * @return HasMany
     */
    public function replies() :HasMany
    {
        return $this->hasMany(VisitorMessageReply::class);
    }

}
