fix: align backend APIs and upload flow
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user