using Microsoft.AspNetCore.Http;
using PowderCoating.Core.Enums;
namespace PowderCoating.Application.Interfaces;
public interface IJobPhotoService
{
///
/// Saves a job photo to filesystem using a GUID-based filename for security
/// Stores in [ContentRoot]/media/{companyId}/job-photos/{jobId}/{guid}.{ext}
///
/// The photo file to upload
/// The job's ID
/// The company's ID
/// Optional caption/note for the photo
/// Type of photo (Before, Progress, After, etc.)
/// Tuple with success status, relative file path, and error message if any
Task<(bool Success, string FilePath, string ErrorMessage)> SaveJobPhotoAsync(
IFormFile file,
int jobId,
int companyId,
string? caption = null,
JobPhotoType photoType = JobPhotoType.Progress);
///
/// Deletes a job photo from filesystem
///
/// Relative path to the photo file
/// Tuple with success status and error message if any
Task<(bool Success, string ErrorMessage)> DeleteJobPhotoAsync(string filePath);
///
/// Gets a job photo
///
/// Relative path to the photo
/// Tuple with success status, file bytes, content type, and error message
Task<(bool Success, byte[] FileContent, string ContentType, string ErrorMessage)> GetJobPhotoAsync(string filePath);
///
/// Checks if a job photo exists
///
/// Relative path to the photo
/// True if exists, false otherwise
Task JobPhotoExistsAsync(string filePath);
}