添加项目文件。
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
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; } = FileState.Uploaded;
|
||||
public StorageLocation StorageLocation { get; private set; } = new StorageLocation();
|
||||
public CheckSum CheckSum { get; private set; }
|
||||
|
||||
private UploadFile() { }
|
||||
|
||||
public UploadFile(Guid ownerId, FileName fileName, long fileSize, ContentType contentType, StorageLocation? storageLocation, CheckSum checkSum)
|
||||
{
|
||||
OwnerId = ownerId;
|
||||
FileName = fileName;
|
||||
FileSize = fileSize;
|
||||
ContentType = contentType;
|
||||
StorageLocation = storageLocation ?? new StorageLocation();
|
||||
CheckSum = checkSum;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user