refactor: consolidate project structure by migrating authentication, identity, and shared UI components while removing legacy Web Client files.
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace NexusReader.Domain.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// Represents an E-book uploaded or owned by a user.
|
||||
/// </summary>
|
||||
public class Ebook
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
|
||||
[Required]
|
||||
[MaxLength(255)]
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
[MaxLength(255)]
|
||||
public string Author { get; set; } = "Unknown";
|
||||
|
||||
[Required]
|
||||
public string FilePath { get; set; } = string.Empty;
|
||||
|
||||
public string? CoverUrl { get; set; }
|
||||
|
||||
public DateTime AddedDate { get; set; } = DateTime.UtcNow;
|
||||
|
||||
public DateTime? LastReadDate { get; set; }
|
||||
|
||||
// Relationship to NexusUser
|
||||
[Required]
|
||||
public string UserId { get; set; } = string.Empty;
|
||||
|
||||
[ForeignKey(nameof(UserId))]
|
||||
public NexusUser? User { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user