Files
Govor/Govor.Application/Interfaces/Medias/IMediaService.cs
T
Artemy 66819a015a Refactor media attachments to use MediaFile entity
This commit introduces the MediaFile entity and updates the media attachments model, repositories, and related logic to reference MediaFile instead of storing file metadata directly in MediaAttachments. Controller, service, and SignalR request/response contracts are updated to support the new structure. Database configurations and validators are also adjusted accordingly. This refactor improves media management and normalization in the data model.
2025-07-06 21:09:12 +07:00

14 lines
449 B
C#

using Govor.Core.Models;
namespace Govor.Application.Interfaces.Medias;
public interface IMediaService
{
public Task<MediaUploadResult> UploadMediaAsync(Media file);
public Task DeleteMediaAsync(Guid fileId);
public Task<MediaUploadResult> GetMediaAsync(string url);
}
public record Media(byte[] Data, string FileName, MediaType Type, string MineType, string EncryptedKey);
public record MediaUploadResult(Guid? MediaId, string Url);