[ADD] New entities for library db
This commit is contained in:
33
Manager.Data/Models/LibraryContext/MediaEntity.cs
Normal file
33
Manager.Data/Models/LibraryContext/MediaEntity.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
namespace Manager.Data.Models.LibraryContext;
|
||||
|
||||
public class MediaEntity : DateTimeBase
|
||||
{
|
||||
public required string Id { get; set; }
|
||||
public string? Title { get; set; }
|
||||
public string? Description { get; set; }
|
||||
public DateTime UploadDateUtc { get; set; }
|
||||
public required string ChannelId { get; set; }
|
||||
public List<MediaFormatEntity> Formats { get; set; } = [];
|
||||
public List<CaptionEntity> Captions { get; set; } = [];
|
||||
|
||||
public MediaState State { get; set; } = MediaState.Online;
|
||||
public bool IsDownloaded { get; set; }
|
||||
public MediaProcessState ProcessState { get; set; } = MediaProcessState.ToDownload;
|
||||
}
|
||||
|
||||
public enum MediaState
|
||||
{
|
||||
Online,
|
||||
Offline,
|
||||
Limited,
|
||||
Removed
|
||||
}
|
||||
|
||||
public enum MediaProcessState
|
||||
{
|
||||
ToDownload,
|
||||
Downloaded,
|
||||
ToRemove,
|
||||
Removed,
|
||||
Failed
|
||||
}
|
Reference in New Issue
Block a user