Files
Nexus.Reader/src/NexusReader.Domain/Entities/BookRevision.cs
T
mjasin 8856fb1614 feat(creator): Refactor Creator flow, implement book creation pipeline & versioning, and setup Docker staging
- Relocate dashboard routing to /creator and editor workspace to /creator/edit/{BookId}
- Implement CreateBookCommand and handler with transactional default chapter seeding
- Implement PublishBookVersionCommand and GetCreatorDashboardDataQuery
- Build CreatorDashboard modal and UI components with customized dark input styles
- Add run-stage.sh script to automate staging environment setup, database migrations, and health checks
- Update developer workflow rules in GEMINI.md
2026-06-14 10:58:37 +02:00

32 lines
817 B
C#

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace NexusReader.Domain.Entities;
/// <summary>
/// Encapsulates a snapshot or draft version of a Book's chapters.
/// </summary>
public class BookRevision
{
[Key]
public Guid Id { get; set; } = Guid.NewGuid();
[Required]
public Guid BookId { get; set; }
[ForeignKey(nameof(BookId))]
public virtual Book Book { get; set; } = null!;
[Required]
[MaxLength(100)]
public string VersionString { get; set; } = "Working Draft";
public bool IsPublished { get; set; } = false;
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime? PublishedAt { get; set; }
public virtual ICollection<Chapter> Chapters { get; set; } = new List<Chapter>();
}