todo/app/Models/TaskStatus.php

30 lines
548 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class TaskStatus extends Model
{
use HasFactory;
protected $fillable = [
'id',
'name',
'project_id',
'created_by_id',
];
public function project(): BelongsTo
{
return $this->belongsTo(Project::class);
}
public function task(): BelongsTo
{
return $this->belongsTo(Task::class);
}
}