<?php

namespace App\Models;

# use Illuminate\Database\Eloquent\Model;

class ActionItem extends Model
{
    protected $table = 'action_item';

    public function facility()
    {
        return $this->belongsTo(Facility::class, 'to_facility_id', 'id');
    }

    public function client()
    {
        return $this->belongsTo(Client::class, 'client_id', 'id');
    }


    public function pro()
    {
        return $this->belongsTo(Pro::class, 'ally_pro_id', 'id');
    }


    public function actionItemContentUpdates()
    {
        return $this->hasMany(ActionItemContentUpdate::class, 'action_item_id');
    }
}
