Commit the Projects/Tasks/Ideas/TaskComments feature

This was already implemented, migrated, and running live, but had
never been committed. Bringing it into git: Project/Task/Idea/
TaskComment models, their JSON API (CRUD + status transitions,
task comments, idea<->project linking), Livewire UI pages, and the
nav/route wiring for them. All 42 of its own tests pass.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
m105
2026-08-06 20:41:57 +03:00
co-authored by Claude Sonnet 5
parent 6ff7f78c9c
commit a4ff6c0ccb
39 changed files with 3411 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
class TaskComment extends Model
{
use HasFactory, SoftDeletes;
public const AUTHOR_TYPES = ['user', 'ai', 'system'];
protected $fillable = [
'task_id',
'body',
'author_type',
'author_name',
];
public function task(): BelongsTo
{
return $this->belongsTo(Task::class);
}
public function isFromAI(): bool
{
return $this->author_type === 'ai';
}
public function isFromUser(): bool
{
return $this->author_type === 'user';
}
public function isSystem(): bool
{
return $this->author_type === 'system';
}
}