<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Mentor extends Model
{
    protected $fillable = [
        'join_as',
        'event_id',
        'profile_image',
        'full_name',
        'email',
        'whatsapp_number',
        'telegram_number',
        'password',
        'division_id',
        'district_id',
        'upazila_id',
        'village_area',
        'institute',
        'class_level_designation',
        'group_department_subject',
        'institute_mobile',
        'institute_email',
        'institute_eiin_no',
        'agree_terms',
    ];

    protected $hidden = ['password'];
    
    public function event()
    {
        return $this->belongsTo(Event::class, 'event_id');
    }
    
    public function division()
    {
        return $this->belongsTo(Division::class, 'division_id');
    }
    
    public function district()
    {
        return $this->belongsTo(District::class, 'district_id');
    }
    
    public function upazila()
    {
        return $this->belongsTo(Upazila::class, 'upazila_id');
    }
    
    public function join(){
        return $this->belongsTo(JoinAsType::class, 'join_as', 'id');
    }
}
