fix: align backend APIs and upload flow

This commit is contained in:
2026-09-11 18:18:59 +08:00
parent 32177a7293
commit 898cf5dba0
69 changed files with 1081 additions and 153 deletions
+9 -1
View File
@@ -12,10 +12,14 @@ namespace FileService.Domain.Entities
public FileState State { get; private set; } = FileState.Uploaded;
public StorageLocation StorageLocation { get; private set; } = new StorageLocation();
public CheckSum CheckSum { get; private set; }
public Guid? SourceTaskId { get; private set; }
public string? ChatType { get; private set; }
public Guid? TargetId { get; private set; }
public bool IsPublic { get; private set; }
private UploadFile() { }
public UploadFile(Guid ownerId, FileName fileName, long fileSize, ContentType contentType, StorageLocation? storageLocation, CheckSum checkSum)
public UploadFile(Guid ownerId, FileName fileName, long fileSize, ContentType contentType, StorageLocation? storageLocation, CheckSum checkSum, Guid? sourceTaskId = null, string? chatType = null, Guid? targetId = null, bool isPublic = false)
{
OwnerId = ownerId;
FileName = fileName;
@@ -23,6 +27,10 @@ namespace FileService.Domain.Entities
ContentType = contentType;
StorageLocation = storageLocation ?? new StorageLocation();
CheckSum = checkSum;
SourceTaskId = sourceTaskId;
ChatType = chatType?.ToUpperInvariant();
TargetId = targetId;
IsPublic = isPublic;
State = FileState.Uploaded;
}