feat: normalize release-cardinal fields out of track into a Release entity (Phase 8 §8.0)
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
using DeepDrftModels.Enums;
|
||||
using Models.Entities;
|
||||
|
||||
namespace DeepDrftModels.Entities;
|
||||
@@ -6,17 +5,16 @@ namespace DeepDrftModels.Entities;
|
||||
// Inherits Id, CreatedAt, UpdatedAt, IsDeleted from BaseEntity (Cerebellum.BlazorBlocks.Models).
|
||||
// BaseEntity ships the audit columns but does not declare IEntity itself, so subclasses
|
||||
// declare it explicitly to satisfy the generic constraints on Repository<>/Manager<>/etc.
|
||||
//
|
||||
// Track-cardinal data only (Phase 8 §8.0). Release-cardinal fields (Artist, Album→Title, Genre,
|
||||
// ReleaseDate, ImagePath, ReleaseType, CreatedByUserId) live on ReleaseEntity, reached via the
|
||||
// nullable Release navigation; ReleaseId is null for singles and loose tracks.
|
||||
public class TrackEntity : BaseEntity, IEntity
|
||||
{
|
||||
public required string EntryKey { get; set; }
|
||||
public required string TrackName { get; set; }
|
||||
public required string Artist { get; set; }
|
||||
public string? Album { get; set; }
|
||||
public string? Genre { get; set; }
|
||||
public DateOnly? ReleaseDate { get; set; }
|
||||
public string? ImagePath { get; set; }
|
||||
public long? CreatedByUserId { get; set; }
|
||||
public string? OriginalFileName { get; set; }
|
||||
public ReleaseType ReleaseType { get; set; } = ReleaseType.Single;
|
||||
public int TrackNumber { get; set; } = 1;
|
||||
public long? ReleaseId { get; set; }
|
||||
public ReleaseEntity? Release { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user