添加项目文件。

This commit is contained in:
2026-04-30 21:08:28 +08:00
parent c60f5fe117
commit cc017b6495
327 changed files with 12860 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
using FileService.Domain.ValueObjects;
using IM.DomainCommons;
namespace FileService.Domain.Entities
{
public class UploadFile:AggregateRootEntity
{
public Guid OwnerId { get; private set; }
public FileName FileName { get; private set; }
public long FileSize { get;private set; }
public ContentType ContentType { get;private set; }
public FileState State { get; private set; }
public StorageLocation? StorageLocation { get; private set; }
public CheckSum CheckSum { get; private set; }
private UploadFile() { }
public UploadFile(Guid ownerId, string fileName, string contentType)
{
OwnerId = ownerId;
FileName = fileName;
ContentType = contentType;
State = FileState.Created;
}
public void StartUpload()
{
State = FileState.Uploading;
}
public void CompleteUpload(StorageLocation storage, CheckSum checkSum)
{
StorageLocation = storage;
CheckSum = checkSum;
State = FileState.Uploaded;
}
public void Fail()
{
}
}
}