mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 09:11:10 +00:00
Implements first stage library management system
This commit is contained in:
1 parent
5e0f94cd82
commit
36352ea9e8
291 files changed
+3733
-1384
No files matched your search
@@ -3,7 +3,6 @@ using FluentValidation;
|
||||
using Lumina.Presentation.Web.Common.Api;
|
||||
using Lumina.Presentation.Web.Common.Exceptions;
|
||||
using Lumina.Presentation.Web.Common.Filters;
|
||||
using Lumina.Presentation.Web.Common.Services;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Polly;
|
||||
using Polly.CircuitBreaker;
|
||||
@@ -62,7 +61,6 @@ public static class PresentationWebLayerServices
|
||||
.AddPolicyHandler(retryPolicy)
|
||||
.AddPolicyHandler(circuitBreakerPolicy);
|
||||
|
||||
services.AddScoped<INotificationService, NotificationService>();
|
||||
services.AddScoped<ApiExceptionFilter>();
|
||||
|
||||
return services;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
namespace Lumina.Presentation.Web.Common.Enums.BookLibrary;
|
||||
namespace Lumina.Presentation.Web.Common.Enums.BookLibrary;
|
||||
|
||||
/// <summary>
|
||||
/// Enumeration for the types of written content libraries.
|
||||
/// </summary>
|
||||
public enum WrittenContentType
|
||||
public enum WrittenContentType // TODO: to be removed?
|
||||
{
|
||||
/// <summary>
|
||||
/// A printed or written literary work.
|
||||
@@ -35,6 +35,11 @@ public enum WrittenContentType
|
||||
/// </summary>
|
||||
Magazine,
|
||||
|
||||
/// <summary>
|
||||
/// Periodical publication containing news.
|
||||
/// </summary>
|
||||
Newspaper,
|
||||
|
||||
/// <summary>
|
||||
/// A style of Japanese comic books and graphic novels.
|
||||
/// </summary>
|
||||
@@ -59,4 +64,4 @@ public enum WrittenContentType
|
||||
/// A script for a film, television program, or other visual media.
|
||||
/// </summary>
|
||||
Screenplay,
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Lumina.Presentation.Web.Common.Enums.Library;
|
||||
namespace Lumina.Presentation.Web.Common.Enums.Library;
|
||||
|
||||
/// <summary>
|
||||
/// Enumeration for the types of libraries.
|
||||
@@ -6,27 +6,182 @@
|
||||
public enum LibraryType
|
||||
{
|
||||
/// <summary>
|
||||
/// Content that is written, such as books, articles, or other written works.
|
||||
/// Traditional printed books in physical format.
|
||||
/// </summary>
|
||||
WrittenContent,
|
||||
Book,
|
||||
|
||||
/// <summary>
|
||||
/// Content that is video, such as movies, TV shows, or other video works.
|
||||
/// Digital books in electronic format (e.g., PDF, EPUB, MOBI).
|
||||
/// </summary>
|
||||
VideoContent,
|
||||
EBook,
|
||||
|
||||
/// <summary>
|
||||
/// Content that is audio, such as podcasts, radio shows, or other audio works.
|
||||
/// Comic books in digital or physical format.
|
||||
/// </summary>
|
||||
AudioContent,
|
||||
ComicBook,
|
||||
|
||||
/// <summary>
|
||||
/// Content that is visual, such as images, paintings, or other visual works.
|
||||
/// Periodical publications containing articles and illustrations.
|
||||
/// </summary>
|
||||
VisualContent,
|
||||
Magazine,
|
||||
|
||||
/// <summary>
|
||||
/// Content that is miscellaneous, such as lyrics, movie posters, or other miscellaneous works.
|
||||
/// Periodical publication containing news.
|
||||
/// </summary>
|
||||
MiscellaneousContent,
|
||||
}
|
||||
Newspaper,
|
||||
|
||||
/// <summary>
|
||||
/// Japanese-style comics and graphic novels.
|
||||
/// </summary>
|
||||
Manga,
|
||||
|
||||
/// <summary>
|
||||
/// Extended comic-format narratives, typically containing a complete story.
|
||||
/// </summary>
|
||||
GraphicNovel,
|
||||
|
||||
/// <summary>
|
||||
/// Scholarly articles and research papers.
|
||||
/// </summary>
|
||||
AcademicPaper,
|
||||
|
||||
/// <summary>
|
||||
/// Musical notation and scores.
|
||||
/// </summary>
|
||||
SheetMusic,
|
||||
|
||||
/// <summary>
|
||||
/// Television series and episodic content.
|
||||
/// </summary>
|
||||
TvShow,
|
||||
|
||||
/// <summary>
|
||||
/// Feature-length films and motion pictures.
|
||||
/// </summary>
|
||||
Movie,
|
||||
|
||||
/// <summary>
|
||||
/// Non-fiction films presenting factual information.
|
||||
/// </summary>
|
||||
Documentary,
|
||||
|
||||
/// <summary>
|
||||
/// Japanese animation series and films.
|
||||
/// </summary>
|
||||
Anime,
|
||||
|
||||
/// <summary>
|
||||
/// Recorded live music performances and concerts.
|
||||
/// </summary>
|
||||
ConcertVideo,
|
||||
|
||||
/// <summary>
|
||||
/// Educational and instructional videos.
|
||||
/// </summary>
|
||||
TutorialVideo,
|
||||
|
||||
/// <summary>
|
||||
/// Personally recorded videos and family footage.
|
||||
/// </summary>
|
||||
HomeVideo,
|
||||
|
||||
/// <summary>
|
||||
/// Videos sourced from YouTube platform.
|
||||
/// </summary>
|
||||
YouTubeVideo,
|
||||
|
||||
/// <summary>
|
||||
/// Professional or amateur music video productions.
|
||||
/// </summary>
|
||||
MusicVideo,
|
||||
|
||||
/// <summary>
|
||||
/// Videos recorded during live performances or events.
|
||||
/// </summary>
|
||||
LiveRecordingVideo,
|
||||
|
||||
/// <summary>
|
||||
/// Recorded conversations and Q&A sessions in video format.
|
||||
/// </summary>
|
||||
InterviewVideo,
|
||||
|
||||
/// <summary>
|
||||
/// Videos of musical performances covering other artists' work.
|
||||
/// </summary>
|
||||
CoverSongVideo,
|
||||
|
||||
/// <summary>
|
||||
/// Video format podcasts and episodic content.
|
||||
/// </summary>
|
||||
PodcastVideo,
|
||||
|
||||
/// <summary>
|
||||
/// Audio recordings of musical content.
|
||||
/// </summary>
|
||||
Music,
|
||||
|
||||
/// <summary>
|
||||
/// Narrated books in audio format.
|
||||
/// </summary>
|
||||
Audiobook,
|
||||
|
||||
/// <summary>
|
||||
/// Audio recordings from live performances or events.
|
||||
/// </summary>
|
||||
LiveRecordingAudio,
|
||||
|
||||
/// <summary>
|
||||
/// Recorded conversations and Q&A sessions in audio format.
|
||||
/// </summary>
|
||||
InterviewAudio,
|
||||
|
||||
/// <summary>
|
||||
/// Audio recordings of musical performances covering other artists' work.
|
||||
/// </summary>
|
||||
CoverSongAudio,
|
||||
|
||||
/// <summary>
|
||||
/// Modified or reinterpreted versions of original musical recordings.
|
||||
/// </summary>
|
||||
Remix,
|
||||
|
||||
/// <summary>
|
||||
/// Audio clips used for sound design and production.
|
||||
/// </summary>
|
||||
SoundEffect,
|
||||
|
||||
/// <summary>
|
||||
/// Audio format podcasts and episodic content.
|
||||
/// </summary>
|
||||
PodcastAudio,
|
||||
|
||||
/// <summary>
|
||||
/// Digital images and photographs.
|
||||
/// </summary>
|
||||
Photo,
|
||||
|
||||
/// <summary>
|
||||
/// Curated sequences of media items.
|
||||
/// </summary>
|
||||
Playlist,
|
||||
|
||||
/// <summary>
|
||||
/// Grouped sets of related media items.
|
||||
/// </summary>
|
||||
Collection,
|
||||
|
||||
/// <summary>
|
||||
/// Text files containing dialogue translations for video content.
|
||||
/// </summary>
|
||||
Subtitles,
|
||||
|
||||
/// <summary>
|
||||
/// Text files containing words and timing for musical content.
|
||||
/// </summary>
|
||||
Lyrics,
|
||||
|
||||
/// <summary>
|
||||
/// A collection of media that does not fit into any other category.
|
||||
/// </summary>
|
||||
Other
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Presentation.Web.Common.Models.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Presentation.Web.Common.Models.WrittenContentLibrary.BookLibrary;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a book.
|
||||
/// </summary>
|
||||
[DebuggerDisplay("{Title}")]
|
||||
public class BooksModel
|
||||
{
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Presentation.Web.Common.Models.WrittenContentLibrary.BookLibrary;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a preview of important properties of a book.
|
||||
/// </summary>
|
||||
[DebuggerDisplay("{Title}")]
|
||||
public class LightBookModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the Id of the media item.
|
||||
/// </summary>
|
||||
public required Guid Id { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the title of the media item.
|
||||
/// </summary>
|
||||
public required string Title { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the optional release year (either re-release year, if available, or original release year, if known) of the media item.
|
||||
/// </summary>
|
||||
public int? ReleaseYear { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the optional path of the image representing the cover of this book.
|
||||
/// </summary>
|
||||
public string? CoverPath { get; init; }
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Presentation.Web.Common.Enums.Notifications;
|
||||
using Lumina.Presentation.Web.Common.Models.Common;
|
||||
using System;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Presentation.Web.Common.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Interface for the service for showing notifications.
|
||||
/// </summary>
|
||||
public interface INotificationService
|
||||
{
|
||||
event Action<NotificationModel>? OnNotification;
|
||||
|
||||
/// <summary>
|
||||
/// Shows a notification.
|
||||
/// </summary>
|
||||
/// <param name="message">The message of the notification.</param>
|
||||
/// <param name="type">The type of the notification.</param>
|
||||
void Show(string message, NotificationType type);
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Presentation.Web.Common.Enums.Notifications;
|
||||
using Lumina.Presentation.Web.Common.Models.Common;
|
||||
using System;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Presentation.Web.Common.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Service for showing notifications.
|
||||
/// </summary>
|
||||
public class NotificationService : INotificationService
|
||||
{
|
||||
public event Action<NotificationModel>? OnNotification;
|
||||
|
||||
/// <summary>
|
||||
/// Shows a notification.
|
||||
/// </summary>
|
||||
/// <param name="message">The message of the notification.</param>
|
||||
/// <param name="type">The type of the notification.</param>
|
||||
public void Show(string message, NotificationType type)
|
||||
{
|
||||
OnNotification?.Invoke(new NotificationModel { Message = message, Type = type, Id = Guid.NewGuid() });
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user