mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-10-01 02:53:14 +00:00
Enforce MIME/extension/magic-byte validation, auth and workOrderVersion concurrency, audit on category changes, and validate-before-store with blob compensate.
37 lines
1.3 KiB
C#
37 lines
1.3 KiB
C#
using Data.SeaHavenIndustries.Enums;
|
|
using SeaHaven.Services.DTOs;
|
|
|
|
namespace SeaHaven.Services.Interfaces
|
|
{
|
|
public interface IWorkOrderMediaService
|
|
{
|
|
Task<IReadOnlyList<WorkOrderMediaFileDto>?> GetMediaAsync(int workOrderId, CancellationToken cancellationToken = default);
|
|
|
|
/// <summary>
|
|
/// Authorizes the caller and validates the work order is mutable before any blob storage write.
|
|
/// </summary>
|
|
Task EnsureCanMutateMediaAsync(int workOrderId, string? actorId, CancellationToken cancellationToken = default);
|
|
|
|
Task<WorkOrderMediaFileDto> AddMediaAsync(
|
|
int workOrderId,
|
|
WorkOrderMediaCategory? category,
|
|
string fileUrl,
|
|
string? actorId,
|
|
CancellationToken cancellationToken = default);
|
|
|
|
Task<WorkOrderMediaFileDto> UpdateMediaCategoryAsync(
|
|
int workOrderId,
|
|
int mediaId,
|
|
WorkOrderMediaCategory category,
|
|
string? workOrderVersion,
|
|
string? actorId,
|
|
CancellationToken cancellationToken = default);
|
|
|
|
Task DeleteMediaAsync(
|
|
int workOrderId,
|
|
int mediaId,
|
|
string? workOrderVersion,
|
|
string? actorId,
|
|
CancellationToken cancellationToken = default);
|
|
}
|
|
}
|