<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Task extends Model
{
    public $timestamps = false;
    protected $table = "task";

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

    public function company_name()
    {
        return $this->hasOne('App\Models\CompanyModel','id','client_id');
    }

    public function assigned_tasks()
    {
        return $this->hasMany('App\Models\AssignTask');
    }
}
