mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 12:11:10 +00:00
Adds MediaLibraryScanResult database table
This commit is contained in:
1 parent
3c04d32b60
commit
a172344f89
8 files changed
+1172
-2
No files matched your search
+8
-2
@@ -3,19 +3,20 @@ using Lumina.Application.Common.DataAccess.Entities.Common;
|
||||
using Lumina.Application.Common.DataAccess.Entities.UsersManagement;
|
||||
using Lumina.Domain.Common.Enums.MediaLibrary;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Common.DataAccess.Entities.MediaLibrary.Management;
|
||||
|
||||
/// <summary>
|
||||
/// Repository entity for a media library.
|
||||
/// Repository entity for a media library scan.
|
||||
/// </summary>
|
||||
[DebuggerDisplay("Id: {Id}; Status: {Status}")]
|
||||
public class LibraryScanEntity : IStorageEntity, IAuditableEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the Id of the media library.
|
||||
/// Gets the Id of the media library scan.
|
||||
/// </summary>
|
||||
public required Guid Id { get; init; }
|
||||
|
||||
@@ -44,6 +45,11 @@ public class LibraryScanEntity : IStorageEntity, IAuditableEntity
|
||||
/// </summary>
|
||||
public required UserEntity User { get; init; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the collection of library scan results of this library scan.
|
||||
/// </summary>
|
||||
public ICollection<LibraryScanResultEntity> LibraryScanResults { get; init; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the time and date when the entity was added.
|
||||
/// </summary>
|
||||
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Application.Common.DataAccess.Entities.Common;
|
||||
using Lumina.Domain.Common.Enums.MediaLibrary;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Common.DataAccess.Entities.MediaLibrary.Management;
|
||||
|
||||
/// <summary>
|
||||
/// Repository entity for a media library scan result involving a file.
|
||||
/// </summary>
|
||||
[DebuggerDisplay("Id: {Id}; Status: {Status}")]
|
||||
public class LibraryScanResultEntity : IStorageEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the Id of the media library scan result.
|
||||
/// </summary>
|
||||
public Guid Id { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Id of the scan that this scan result belongs to.
|
||||
/// </summary>
|
||||
public required Guid LibraryScanId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the status of the media library scan file.
|
||||
/// </summary>
|
||||
public required LibraryScanFileStatus Status { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the path of the media library scan file.
|
||||
/// </summary>
|
||||
public required string Path { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash calculated for the media library scan file.
|
||||
/// </summary>
|
||||
public required string ContentHash { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the size of the media library scan file.
|
||||
/// </summary>
|
||||
public required long FileSize { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the modification date of the media library scan file.
|
||||
/// </summary>
|
||||
public required DateTime LastModified { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the media library scan that this scan result belongs to.
|
||||
/// </summary>
|
||||
public required LibraryScanEntity LibraryScan { get; init; } = null!;
|
||||
}
|
||||
Reference in new issue
Block a user