<?php

namespace App\Models;

use App\Models\User;
use App\Models\FinishedContracts;
use App\Models\ReportComment;

use Illuminate\Database\Eloquent\Model;

class Report extends Model
{
    //
    protected $fillable = [
        'contract_id',
        'moderator_id',
        'veredict',
    ];


  public function finishedcontracts()
  {
      return $this->belongsTo(FinishedContracts::class, 'contract_id');
  }

  public function user()
  {
      return $this->belongsTo(User::class, 'moderator_id');
  }

  public function reportcomments()
  {
      return $this->hasMany(ReportComment::class);
  }
}
