<?php

namespace App;

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

class ConsultingRequest extends Model
{
    use SoftDeletes;

    protected $fillable = [
        'status',
        'user_id',
        'consulting_id',
        'coupon_id',
        'user_name',
        'user_phone',
        'user_email',
        'pay_way',
        'consulting_type',
        'consulting_way',
        'consulting_topic_id',
        'consulting_subject',
        'consulting_date',
        'consulting_time',
        'zoom_meeting_id',
        'zoom_user_url',
        'zoom_host_url',
        'total',
        'consulting_price',
    ];

    public function user()
    {
        return $this->belongsTo(User::class);
    }

    public function consulting()
    {
        return $this->belongsTo(Consulting::class);
    }

    public function evaluate()
    {
        return $this->hasOne(ConsultingEvaluate::class);
    }

    public function complaint()
    {
        return $this->hasOne(ConsultingComplaint::class);
    }
}
