<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Eventlog extends Model
{
    //
    protected $table = 'eventlogs';
    protected $fillable = array();

    public $timestamps = true;

    public function task()
    {
        return $this->hasOne('App\Task', 'id', 'relation_id');
    }

    public function subtask()
    {
        return $this->hasOne('App\Subtask', 'id', 'relation_id');
    }

    public function user()
    {
        return $this->hasOne('App\User', 'id', 'user_id');
    }

    public function comment()
    {
        return $this->hasOne('Laravelista\Comments\Comments\Comment', 'id', 'comment_id');
    }

    public function notifications()
    {

        return $this->hasMany('App\Notifications', 'id', 'eventlogs_id');
    }



    public function  tasktag(){

        return $this->hasOne('App\Tasktag', 'id', 'relation_id');
    }

//    public function taskStatus(){
//
//        return $this->hasOne('App\Task','id','relation_id')->
//    }

}
