Skip to content

Commit 8cd5085

Browse files
committed
UserId added to File
1 parent 8f8074b commit 8cd5085

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/ProjectIvy.BL/Handlers/File/FileHandler.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,11 @@ public async Task<string> UploadFile(FileBinding file)
4747

4848
var fileEntity = new Model.Database.Main.Storage.File()
4949
{
50-
Created = new DateTime(),
50+
Created = DateTime.Now,
5151
FileTypeId = fileType.Id,
5252
ProviderId = (int)StorageProvider.AzureStorage,
5353
Uri = fullPath,
54+
UserId = User.Id,
5455
ValueId = fileName
5556
};
5657
context.Files.Add(fileEntity);

src/ProjectIvy.Model/Database/Main/Storage/File.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
namespace ProjectIvy.Model.Database.Main.Storage
77
{
88
[Table(nameof(File), Schema = nameof(Storage))]
9-
public class File : IHasValueId
9+
public class File : UserEntity, IHasValueId
1010
{
1111
[Key]
1212
public int Id { get; set; }

0 commit comments

Comments
 (0)