<?php

namespace App;

class Care extends BaseModel
{
    protected $table = 'cares';

    protected $fillable = ['id', 'name', 'first_name', 'last_name', 'slug', 'gender', 'address', 'email', 'phone_number', 'thumbnail', 'counseling_id', 'career', 'qualification', 'introduction', 'user_id', 'is_activated', 'is_deleted', 'created_at', 'updated_at'];

    public function counseling() {
        return $this->belongsTo(Counseling::class, 'counseling_id', 'id')->select('id', 'title', 'description');
    }

    public function user() {
        return $this->belongsTo(User::class, 'user_id', 'id')->select('id', 'name', 'full_name', 'furigana_name');
    }
}
