Files
Toiminnanohjaus/app/Modules/Jobs/Domain/Contracts/TaskImageRepository.php
petriandClaude Sonnet 5.5 ae8172898d Add images to tasks
Everyone who may comment on a task sends images to it, e.g. photos
taken with a phone. The server stores an upright, at most 2560 px JPEG
without EXIF data (no location) and a 400 px thumbnail on the private
disk, served only to those who see the job. Uploaders change captions
(also the alt text) and remove their own images; admin and management
may remove anyone's (jobs.remove-any-task-image). Removing a task also
removes its image files.

Livewire's temporary upload limit is raised to PHP's 40 MB so that the
page's own 12 MB limit gives a translated message.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-25 07:46:53 +02:00

27 lines
614 B
PHP

<?php
declare(strict_types=1);
namespace App\Modules\Jobs\Domain\Contracts;
use App\Modules\Jobs\Domain\Entities\TaskImage;
interface TaskImageRepository
{
/**
* Null when the image does not exist or belongs to another task.
*/
public function findForTask(int $taskId, int $imageId): ?TaskImage;
/**
* The files of all the task's images, for removing them with the task.
*
* @return list<string>
*/
public function filePathsOfTask(int $taskId): array;
public function save(TaskImage $image): TaskImage;
public function delete(TaskImage $image): void;
}